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.
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.
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.
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 } }