Pointer Lock is intended to simplify mouse locking to access mouse events even when the cursor goes past the boundary of the window or screen. For example, a user can continue to rotate or manipulate a 3D model by moving the mouse without end. Without mouse locking, the rotation or manipulation stops the moment the pointer reaches the edge of the window or screen.
To sum up, if you want to make a first-person 3D game (DOOM-like, Quake-like etc.) with Defold, you need this extension.
I wanted to join the latest LD49 and to make another one 3D FPS game with Defold. However, I didn’t come up with an idea. And instead of that, I made this asset based on DRILLER.
Enjoy!
Check the Github page to see what’s included and how to use the asset:
I want to bump up this theme because of the bug #1. The cursor is locked in the top right corner of the window on macOS. This creates effects that make the game unplayable:
Moving the mouse upwards causes the window title bar to pop up in full screen mode. This is normal macOS behaviour on the top edge of the screen.
Same thing happens with moving from right to left. With enough movement, the system sidebar opens.
Mouse wheel events are no longer accepted after the cursor locking because of the top left corner position on the edge of the window.
@aglitchman suggests that this is a problem with the outdated GLFW inside Defold, check the comments in the issue. So what might be the right way to fix this?
We should fix it in our copy of GLFW. Note that we use a heavily modified version of GLFW so straight up updating to a new version is not an option. (we want to do this update at some point but it has not been prioritised)