Description
The GroundVelocity
property of the PlayerController
class represents the velocity at which the ground beneath the player is moving. This property is useful for determining how the player's movement should be adjusted based on the movement of the surface they are standing on.
Usage
To access the GroundVelocity
property, you need to have an instance of the PlayerController
class. You can then read the property to get the current ground velocity.
Example
// Assuming 'playerController' is an instance of PlayerController
Vector3 currentGroundVelocity = playerController.GroundVelocity;
// Use the ground velocity for calculations
if (currentGroundVelocity.Length > 0)
{
// Adjust player movement based on ground velocity
}