Vector3 UpdateMove( Rotation eyes, Vector3 input )

book_4_sparkGenerated
code_blocksInput

Description

The UpdateMove method in the MoveModeSwim class is responsible for updating the movement vector of a character while swimming. This method calculates the new movement direction based on the character's current orientation and input vector.

Usage

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

Example

// Assuming 'swimMode' is an instance of MoveModeSwim
Rotation currentEyeRotation = player.GetEyeRotation();
Vector3 inputDirection = new Vector3(1, 0, 0); // Example input

Vector3 updatedMovement = swimMode.UpdateMove(currentEyeRotation, inputDirection);
// Use 'updatedMovement' to apply movement logic