Description
The Velocity
property of the PlayerController
class represents the player's actual physical velocity, excluding any velocity imparted by the ground beneath them. This property is useful for determining the player's movement speed in the world, independent of any ground movement.
Usage
Use the Velocity
property to access or modify the player's current velocity in the game world. This can be useful for implementing custom movement logic or for debugging purposes.
Example
// Example of accessing the Velocity property
PlayerController playerController = new PlayerController();
Vector3 currentVelocity = playerController.Velocity;
// Example of setting the Velocity property
playerController.Velocity = new Vector3(0, 0, 10);