PcoWSkbVqDnWTu_dm2ix
We use cookies on this site to enhance your user experience
Collapse Sidebar

DevTouchCameraMovementMode

StarterPlayer

DevTouchCameraMovementMode

The DevTouchCameraMovementMode StarterPlayer property lets the developer overwrite the player’s camera mode if the player is on a touch device.

This is the default property for players joining the game. It can be changed for individual players by settings the Player/DevTouchCameraMode.

If set to UserChoice then the player’s camera movement mode will be determined by whatever the player set in the game settings. Otherwise, the mode will be set based on this property.

See Enum/DevTouchCameraMovementMode for the different camera modes available.

Note

This property has no affect players not on a mobile device.


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.

local player = game.Players.LocalPlayer

-- Set the player's camera movement mode on mobile devices to classic
player.DevTouchCameraMovementMode = Enum.DevTouchCameraMovementMode.Classic