Pointer Lock Controls – Cocos Creator


Hello community,

I have question regarding camera rotating like in a first person shooters. With mouse event I get just delta movement of a mouse, but it works only if mouse moves in the screen and not out of it as it should in FPS games. I found that three.js have this controls out of the box:
https://sbcode.net/threejs/pointerlock-controls/

Does Cocos Creator has something similar, or someone has an example of how to achieve this?

Thank you very much! :slight_smile:



Source link

More To Explore

Share on facebook
Share on twitter
Share on linkedin
Share on email