void Accelerate( Vector3 vector )

book_4_sparkGenerated
code_blocksInput

Description

The Accelerate method is part of the CharacterController class in the Sandbox framework. This method is used to add acceleration to the current velocity of the character. The acceleration is applied in the direction specified by the vector parameter. The method automatically handles the scaling by the time delta, so you do not need to manually adjust for frame time.

Usage

To use the Accelerate method, you need to have an instance of the CharacterController class. You can then call the method with a Vector3 parameter that represents the direction and magnitude of the acceleration you want to apply.

Example

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