float BodyWeight { get; set; }

robot_2Generated
code_blocksInput

Description

The BodyWeight property of the CitizenAnimationHelper class is a float value that determines the influence of the body in the look-at behavior of a citizen character. This property is part of the look-at system, which allows the character to focus on a specific target in the game world.

The BodyWeight value ranges from 0 to 1, where 0 means no influence and 1 means full influence. Adjusting this value affects how much the body of the character will turn towards the target when the look-at feature is enabled.

Usage

To use the BodyWeight property, ensure that the LookAtEnabled property is set to true. Then, adjust the BodyWeight to control how much the character's body should turn towards the target.

Example usage:

var animationHelper = new CitizenAnimationHelper();
animationHelper.LookAtEnabled = true;
animationHelper.BodyWeight = 0.5f; // Set body influence to 50%

Example

var animationHelper = new CitizenAnimationHelper();
animationHelper.LookAtEnabled = true;
animationHelper.BodyWeight = 0.5f; // Set body influence to 50%