API for interacting with model components.
| Namespace: | dmGameSystem |
| Include: | #include <dmsdk/gamesys/components/comp_model.h> |
dmRig::Result CompModelPlayAnimation(HModelWorld world, HModelComponent component, dmhash_t anim_id, dmRig::RigPlayback playback, float blend_duration, float offset, float playback_rate, FModelAnimationCallback callback, void* callback_ctx)
Play a model animation.
PARAMETERS
HModelWorld |
world |
Model world. |
HModelComponent |
component |
Model component. |
dmhash_t |
anim_id |
Animation to play. |
dmRig::RigPlayback |
playback |
Playback mode. |
float |
blend_duration |
Duration of a linear blend between the current and new animation. |
float |
offset |
The normalized initial value of the animation cursor when the animation starts playing. |
float |
playback_rate |
The rate with which the animation will be played. Must be positive. |
FModelAnimationCallback |
callback |
Optional function callback to send play events to. |
void* |
callback_ctx |
Optional function callback context (only when callback is set) |
RETURNS
dmRig::Result |
Result of the operation. |