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

DevComputerCameraMovementMode

StarterPlayer

DevComputerCameraMovementMode

The DevComputerCameraMovementMode StarterPlayer property lets the developer overwrite the player’s camera mode if the player is on a computer.

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

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/DevComputerCameraMovementMode for the different camera modes available.

Note

This property has no affect on players not on a computer.


Code Samples


Setting a Player's Camera Movement Mode (Desktop)

The example demonstrates how to set a player’s camera movement mode for players on a computer.

In this example, we set the camera movement mode to Classic via the Enum/DevComputerCameraMovementMode 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 computers to classic
player.DevComputerCameraMode = Enum.DevComputerCameraMovementMode.Classic