drei
drei copied to clipboard
GizmoHelper + CameraControls, undefined defaultControls.target in GizmoHelper.js
threeversion: ^0.161.0@react-three/fiberversion: ^9.73.3@react-three/dreiversion: ^8.15.16nodeversion: v18.18.0npm(oryarn) version: 4.1.0
Problem description:
Not sure if im doing something wrong but I cant get the two components to work together (I have set the makeDefault prop in CameraControls). The GizmoHelper is complaining about the defaultControls.target being undefined when I click on either side of the GizmoViewCube. Any ideas about what could be the issue?
CameraControls has _target instead of target. We can do a check like const target = '_target' in controls ? controls._target : controls.target and gracefully fail if either are undefined.
I tried that but it made the camera "flicker" in a strange way. Not sure if the tween logic needs some update too. I'll give it a one more go.
If it works you or if you find another solution, let me know 🙏🏼
The issue is that controls' spherical orientation is not updated, so when the gizmo is done animating, the controls reverts back to its stored state.
@CodyJasonBennett Any ideas where an update should be made to the controls orientation? I have been testing out some changes but nothing seems to really fix it...
Any news or potential fixes for this issue ? It's quite a pain that the CameraControls can't work with the GizmoHelper...