Using Camera:SetCameraPanMode()

I am trying to disable camera panning for mobile users when they equip a tool in my building game. The idea is that they can drag parts and blocks without the camera panning while they do so.

Through my research I came across this method, SetCameraPanMode() for the Camera.
It supposedly sets the CameraPanMode for mobile devices to be either Classic (enables camera panning) or EdgeBump (disables camera panning). But when I added this to my local script under the tool, it’s not disabling the camera at all.

Here’s my code (under an Equipped function for a tool in a local script):


Roblox’s documentation on this method: Camera | Roblox Creator Documentation

I’m thinking that I’m not using the syntax properly or I’m just completely trying to use this method wrong. Any help is appreciated or if you have any ideas on an alternative way to do this.

I checked the starter player camera/control module scripts and there is no reference anywhere to the CameraPanMode enum. This seems like a case of Roblox documentation lying to devs about what features are available.

I figured so. Looks like it was released back in 2014 but it was never implemented or it was removed at some point. Thanks for checking.

1 Like