Description
The EyesWeight
property of the CitizenAnimationHelper
class is a float
value that determines the influence of the eyes in the look-at behavior of a citizen character. This property is part of the animation system that allows characters to focus their gaze on a specific target, enhancing realism in animations, especially in scenarios like cutscenes or interactive dialogues.
Usage
To use the EyesWeight
property, ensure that the LookAtEnabled
property is set to true
. Adjust the EyesWeight
value between 0
and 1
to control how much the eyes contribute to the look-at behavior. A value of 0
means the eyes do not move towards the target, while a value of 1
means the eyes fully focus on the target.
Example
// Example of setting the EyesWeight property
var animationHelper = new CitizenAnimationHelper();
animationHelper.LookAtEnabled = true; // Enable look-at behavior
animationHelper.EyesWeight = 0.75f; // Set eyes to focus 75% on the target
// Assuming LookAt is set to a valid GameObject
animationHelper.LookAt = someTargetGameObject;