Open SoraVN98 opened 2 months ago
Thanks for using camera-controls. Unfortunately, that is intentional. Camera-controls is a library designed for orbit rotation controls.
Try to position the target just in front of the camera (1cm). Now if the camera orbits the target, it will have the same effect as if the camera were spinning on its axis.
You can calculate target position depending on camera position like so:
const calculateTarget = (camera: PerspectiveCamera, distance = 0.01): Vector3 =>
(new Vector3()).addVectors(
camera.getWorldPosition(new Vector3()),
camera.getWorldDirection(new Vector3()).multiplyScalar(distance)
);
Is your feature request related to a problem? Please describe.
I want to my camera rotate on its own y-axis like pan movement (not truck) . I try to use rotate function but it seems like the camera move around the target.
Describe the solution you'd like
No response
Describe alternatives you've considered
No response
Additional context
No response