Animating a model
From Valve Developer Community
Revision as of 21:43, 15 September 2011 by Artfunkel (Created page with "'''<code>CBaseAnimating::SetSequence()</code>''' changes an entity's current skeletal animation sequence. If the sequence is already playing, and is not marked as a [[$sequen...")
- Searches for a sequence by name. Avoid doing this if you can.
- Selects an appropriate sequence for the given activity.
- Changes the frame of the current sequence.
- Changes the sequence's speed. The argument is a normalised percentage.
GetSequenceLinearMotion(int sequence, Vector* output)
- Gets a
Vectorwhich describes the sequence's extracted motion over its entire duration.
If your entity inherits from
CBaseAnimatingOverlay you can blend up to 15 sequences on top of the standard one.
int AddLayeredSequence(int sequence, int priority)
- Adds a new layer which plays the given sequence. Return value is the layer's index; check it with
SetLayerAutokill(int layer, bool autokill)
- A layer, by default, persists after its sequence is over. Setting autokill causes it to be removed automatically (even if it loops) once it's through.
int AddGesture(Activity activity, bool autokill = true)
- Helper which creates a layer with the given activity. Return value is the layer's index.
SetLayerDuration(int layer, float duration)
- Adjusts the framerate of the given layer so that it lasts for the given number of seconds.
- Directly access an animation layer. You will need to do this in order to kill one manually.