How to lock camera orientation in a side-scroller setup (mouse + mobile drag input)
Hi,
I’m building a world with a side-scrolling camera perspective, but I’m running into an issue with player input reorienting the camera.
When testing on desktop, any mouse movement or drag rotates the camera away from the fixed side view. On mobile, dragging a finger across the screen similarly changes the camera’s yaw/orientation, instead of maintaining the intended locked profile.
I’ve already tried:
Using a Local camera attach script (setCameraModeAttach with a lateral offset and fixed rotation)
Reapplying the attach on an interval to fight drift
Adjusting input settings like Pan, Follow, and Third Person, but the camera still responds to user input
What’s the best way to disable or remap mouse/touch rotation so the player’s perspective remains strictly locked in side view?
Would this require modifying PlayerControls input mapping, or is there a supported method for locking orientation or redirecting input (e.g. binding mouse drag to jump) within mobile-compatible experiences?
Any official documentation or working workflow examples would be appreciated!
Thank you! 😊
I've used Pan several times before and I don't think I am familiar with what you are describing. Are you able to provide a short video of what you're experiencing?