You can also check this out on my website, ozzypig.com →
Want to enable mouse lock (shift lock) for your mobile players? You’ve come to the right place!
This pack contains an override for the PlayerModuleLoader which does some fancy-pants fiddling to allow access to both the CameraModule
and MouseLockController
objects available in the default PlayerModule. No forking or modifying the PlayerModule is necessary!
You also get a topbar button interface that toggles the lock mode, only appearing for TouchEnabled devices. Check out the video above! ↑
Oh, there’s also an INSTRUCTIONS ModuleScript. Read it for the nitty-gritty.
This was made possible using @EgoMoose’s very clever CameraModule API Public Override, which circumvents the UserRemoveTheCameraApi
FFlag. I simply put together the MouseLockController bit, a nice UI to go with it, and some instructions.
Get the Model on Roblox website ↓
https://www.roblox.com/library/7333069926
Download the Model from the DevForum ↓
Mobile Mouse Lock.rbxm (12.9 KB)
Some fine print to consider
- You’ll probably want to tweak this to fit your game, in particular the included interface.
- This will probably work for a while, though changes Roblox makes to the camera and mouse-lock parts of the PlayerModule may break or cause issues. Speaking of which…
- I’m not liable if you break your game with this - no warranties included :–)
- Perhaps in the future Roblox will have formal support for mouse/shift lock for touch - it’s up to you to know whether or not that has happened yet. Search #updates:announcements just in case.
- I’m also probably not going to provide support or updates for this. But, you’ve got a wonderfully talented community at your fingertips that can help you solve your problems.