RAIN.Motion.AIAnimationExtender Class Reference

The AIAnimationExtender is a component that should be added to AI Avatars that need to manipulate animations from AI Logic. The AIAnimationExtender works in conjunction with Behavior Trees and with Motion to support handling of various animation callbacks. More...

List of all members.

Public Member Functions

virtual void SetAnimationState (string state)
 SetAnimationState is called when the AI requests a particular animation. This is called a "state" instead of an "animation" or "clip" because the AI system assumes that you may be using an animations state machine. Regardless of the variable name, the implementer of this method will be translating the requested animation string into a state change in the animation system.
virtual void SetAnimationSpeed (string state, float speed)
 SetAnimationSpeed is called when the AI requests that a particular state be played back at the given speed. This is used by RAIN to attempt to throttle movement speed when movement is driven by animation. Note that this callback is not intended to cause the AI to switch to the animation state given in the "state" variable.
virtual void DoAnimate (float deltaTime)
 DoAnimate is called as an Update method, whenever the AI wants an animation tick to be processed.
virtual void GetMotionResults (out Vector3 translation, out Vector3 rotation)
 GetMotionResults is called whenever the AI wants to retrieve the outcome of the last DoAnimate call. This assumes that character motion may be driven by the animation system, in which case the AI needs to retrieve the results and apply them to the character controller.

Detailed Description

The AIAnimationExtender is a component that should be added to AI Avatars that need to manipulate animations from AI Logic. The AIAnimationExtender works in conjunction with Behavior Trees and with Motion to support handling of various animation callbacks.


Member Function Documentation

virtual void RAIN.Motion.AIAnimationExtender.DoAnimate ( float  deltaTime) [virtual]

DoAnimate is called as an Update method, whenever the AI wants an animation tick to be processed.

Parameters:
deltaTimeThe timestep/length of the animation tick.
virtual void RAIN.Motion.AIAnimationExtender.GetMotionResults ( out Vector3  translation,
out Vector3  rotation 
) [virtual]

GetMotionResults is called whenever the AI wants to retrieve the outcome of the last DoAnimate call. This assumes that character motion may be driven by the animation system, in which case the AI needs to retrieve the results and apply them to the character controller.

Parameters:
translationLinear movement results
rotationRotational movement results in degrees
virtual void RAIN.Motion.AIAnimationExtender.SetAnimationSpeed ( string  state,
float  speed 
) [virtual]

SetAnimationSpeed is called when the AI requests that a particular state be played back at the given speed. This is used by RAIN to attempt to throttle movement speed when movement is driven by animation. Note that this callback is not intended to cause the AI to switch to the animation state given in the "state" variable.

Parameters:
stateThe animation state to adjust
speedThe speed the animation should be played at whenever it is played
virtual void RAIN.Motion.AIAnimationExtender.SetAnimationState ( string  state) [virtual]

SetAnimationState is called when the AI requests a particular animation. This is called a "state" instead of an "animation" or "clip" because the AI system assumes that you may be using an animations state machine. Regardless of the variable name, the implementer of this method will be translating the requested animation string into a state change in the animation system.

Parameters:
stateThe animation state to transition to