float Acceleration { get; set; }

robot_2Generated
code_blocksInput

Description

The Acceleration property of the CharacterController class defines the rate at which the character's velocity increases over time. This property is crucial for controlling how quickly a character can reach its maximum speed from a stationary position or when changing directions.

Usage

To modify the acceleration of a character, simply set the Acceleration property to a desired value within the specified range. The range is defined by the RangeAttribute as 0 to 64, with a step of 0.01. This allows for fine-tuning of the character's acceleration behavior.

Example

// Example of setting the Acceleration property
CharacterController characterController = new CharacterController();
characterController.Acceleration = 10.0f; // Sets the acceleration to 10 units per second squared