yomotsu / camera-controls

A camera control for three.js, similar to THREE.OrbitControls yet supports smooth transitions and more features.
https://yomotsu.github.io/camera-controls/
MIT License
1.99k stars 253 forks source link

Pointer lock behaviour different ? #476

Open narasimhajupally opened 8 months ago

narasimhajupally commented 8 months ago

Describe the bug

lockPointer() function is behaving diff than <PointerLockControls/>(demo: https://vkgi6.csb.app/) from https://github.com/pmndrs/drei

lockPointer() here seems to move the camera and in pointerLockControls the camera seems to rotate in the current position

To Reproduce

https://yomotsu.github.io/camera-controls/examples/pointer-lock.html

default behaviour

Code

No response

Live example

No response

Expected behavior

https://vkgi6.csb.app/

Screenshots or Video

No response

Device

No response

OS

No response

Browser

No response

yomotsu commented 8 months ago

Thanks for your report. However, I think that is an intended behavior. camera-controls has the distance from the center because of the orbit rotation.

Although you can set almost zero distance like (0.00001)