Description
The RunByDefault
property of the PlayerController
class determines the default movement behavior of the player character. When set to true
, the player will run by default. Holding the AltMoveButton
will switch the player's movement to walking. Conversely, if set to false
, the player will walk by default, and holding the AltMoveButton
will make the player run.
Usage
To use the RunByDefault
property, you can set it in your player controller script to define whether the player should run or walk by default. This can be useful for games where running is the primary mode of movement, or for games where walking is preferred and running is a secondary action.
Example
// Example of setting the RunByDefault property
PlayerController playerController = new PlayerController();
// Set the player to run by default
playerController.RunByDefault = true;
// Alternatively, set the player to walk by default
playerController.RunByDefault = false;