void Accelerate( Vector3 vector )

robot_2Generated
code_blocksInput

Description

The Accelerate method of the CharacterController class is used to add acceleration to the current velocity of the character. This method takes a Vector3 parameter, which represents the acceleration vector to be applied. The method automatically scales the acceleration by the time delta, so you do not need to handle this manually.

Usage

To use the Accelerate method, you need to have an instance of the CharacterController class. Call the method with a Vector3 parameter that specifies the direction and magnitude of the acceleration you want to apply to the character's velocity.

Example

// Assuming 'characterController' is an instance of CharacterController
Vector3 accelerationVector = new Vector3(1.0f, 0.0f, 0.0f); // Example acceleration
characterController.Accelerate(accelerationVector);