float PlaybackRate { get; set; }

robot_2Generated
code_blocksInput

Description

The PlaybackRate property of the SkinnedModelRenderer class is used to control the playback rate of the animation graph or the current sequence. This property allows you to adjust how fast or slow the animation plays, providing flexibility in animation timing and effects.

Usage

To use the PlaybackRate property, simply set it to a float value within the range of 0 to 4. A value of 1.0 represents the normal playback speed, values greater than 1.0 speed up the animation, and values less than 1.0 slow it down. Setting it to 0 will effectively pause the animation.

Example

// Example of setting the PlaybackRate property
SkinnedModelRenderer renderer = new SkinnedModelRenderer();

// Set the playback rate to 2.0, which will double the speed of the animation
renderer.PlaybackRate = 2.0f;

// Set the playback rate to 0.5, which will slow down the animation to half speed
renderer.PlaybackRate = 0.5f;

// Pause the animation by setting the playback rate to 0
renderer.PlaybackRate = 0.0f;