how can i zoom in on a raycaster selection?

That’s because you’re using OrbitControls, which pretty much takes over your camera and assigns its position and rotation once per frame. When you try to set its position manually, OrbitControls overrides anything you did.

The solution is to make your controls variable global. Then when you’re ready to take over the camera position, set controls.enabled = false; in the onClick() function. Then when you’re ready to return to the regular controls, set controls.enabled = true;

https://threejs.org/docs/#examples/en/controls/OrbitControls.enabled

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top