float DuckLevel { get; set; }

robot_2Generated
code_blocksInput

Description

The DuckLevel property represents the scale of the character being ducked or crouched. It is a floating-point value ranging from 0 to 1, where 0 indicates the character is standing upright, and 1 indicates the character is fully crouched.

Usage

To adjust the crouch level of a character, set the DuckLevel property to a value between 0 and 1. This can be used to smoothly transition between standing and crouching animations.

Example

// Example of setting the DuckLevel property
var animationHelper = new CitizenAnimationHelper();

// Set the character to be half-crouched
animationHelper.DuckLevel = 0.5f;

// Fully crouch the character
animationHelper.DuckLevel = 1.0f;

// Stand the character upright
animationHelper.DuckLevel = 0.0f;