void WithLook( Vector3 lookDirection, float eyesWeight, float headWeight, float bodyWeight )

robot_2Generated
code_blocksInput

Description

The WithLook method in the CitizenAnimationHelper class is used to control the direction in which a citizen character is looking. This method allows you to specify the direction the character should look towards, as well as the influence of the eyes, head, and body in achieving this look direction.

Usage

To use the WithLook method, you need to provide a Vector3 representing the direction you want the character to look towards. Additionally, you can specify the weights for the eyes, head, and body, which determine how much each part contributes to the overall look direction. These weights are represented as float values ranging from 0 to 1, where 0 means no influence and 1 means full influence.

Example

// Example usage of the WithLook method
CitizenAnimationHelper animationHelper = new CitizenAnimationHelper();

// Define the direction to look at
Vector3 lookDirection = new Vector3(1, 0, 0); // Looking towards the positive X direction

// Set the weights for eyes, head, and body
float eyesWeight = 0.8f;
float headWeight = 0.5f;
float bodyWeight = 0.3f;

// Apply the look direction with specified weights
animationHelper.WithLook(lookDirection, eyesWeight, headWeight, bodyWeight);