I am using the orbit control in my app and I have a gesture detector wrapped around it to detect tap gestures to add points onto an avatar.
When setting my location based on the value of the tap gesture, I trigger a rerender by storing the selected vector in a state. This causes the scope.target to be reset to a new Vector3. Therefore the camera jumps back to position (0, 0, 0) if I had done a pan gesture prior to it.
I am not sure of the extends of changing this behavior, but storing the target as a ref seems to be solving my issue without creating any unwanted behaviour
I am using the orbit control in my app and I have a gesture detector wrapped around it to detect tap gestures to add points onto an avatar. When setting my location based on the value of the tap gesture, I trigger a rerender by storing the selected vector in a state. This causes the scope.target to be reset to a new Vector3. Therefore the camera jumps back to position (0, 0, 0) if I had done a pan gesture prior to it.
I am not sure of the extends of changing this behavior, but storing the target as a ref seems to be solving my issue without creating any unwanted behaviour