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 (AnimationParams 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
DoAnimate is called as an Update method, whenever the AI wants an animation tick to be processed.
- Parameters:
-
deltaTime | The timestep/length of the animation tick. |
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:
-
translation | Linear movement results |
rotation | Rotational movement results in degrees |
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:
-
state | The animation state to adjust |
speed | The speed the animation should be played at whenever it is played |
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:
-
state | The animation state to transition to |