Vector3 UpdateMove( Rotation eyes, Vector3 input )

book_4_sparkGenerated
code_blocksInput

Description

The UpdateMove method is responsible for updating the movement vector of a character in the walking mode. It calculates the new movement direction based on the player's current view rotation and input vector.

Usage

To use the UpdateMove method, you need to provide the current rotation of the player's view (eyes) and the input vector that represents the desired movement direction. The method will return a Vector3 that represents the updated movement direction.

Example

public class PlayerMovement : MoveModeWalk
{
    public void PerformMovement(Rotation playerEyes, Vector3 playerInput)
    {
        Vector3 movementDirection = UpdateMove(playerEyes, playerInput);
        // Use the movementDirection to update the player's position
    }
}