float PlaybackRate { get; set; }

book_4_sparkGenerated
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 animations are played back, providing flexibility in animation timing and effects.

Usage

To use the PlaybackRate property, simply set it to a float value within the specified range. The range is defined by the RangeAttribute as 0 to 4, with a step of 0.01. This means you can set the playback rate to any value between 0 (stopped) and 4 (four times the normal speed).

Example

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

// Set the playback rate to 1.5 times the normal speed
renderer.PlaybackRate = 1.5f;

// Set the playback rate to half the normal speed
renderer.PlaybackRate = 0.5f;

// Stop the animation
renderer.PlaybackRate = 0.0f;