PcoWSkbVqDnWTu_dm2ix
Collapse Sidebar

DevTouchCameraMode

Player

DevTouchCameraMovementMode

The DevTouchCameraMode property determines the manner in which a player moves their camera when using a UserInputService/TouchEnabled|TouchEnabled device. See Enum/DevTouchCameraMovementMode for a description of each camera control mode available. This property cannot be set using a LocalScript (it must be set on the server using a Script).

The default value of this property is determined by StarterPlayer/DevTouchCameraMovementMode.

Note

  • When set to UserChoice, a player can choose between any control mode (except Scriptable) in the Roblox game settings. In general, it is a good idea to allow players to choose their control mode to maximize accessibility.
  • It is possible to create a custom control scheme by setting this property to Scriptable.
  • This property does not affect players who are not using a touch enabled device. See Player/DevComputerCameraMovementMode instead.


Code Samples


Setting a Player's Camera Movement Mode (Touch)

The example demonstrates how to set a player’s camera movement mode.

In this example, we set the camera movement mode to Classic via the Enum/DevTouchCameraMovementMode enum. This means that the camera of players on touch enabled devices will track the player but will not automatically rotate if the player walks left or right.