Classes | Public Member Functions | Public Attributes
RAIN.Motion.AIAnimationController Class Reference

AIAnimationController is the motion controller for AI whose motion is driven by or strongly linked to animation. AIAnimationController requires the attachment of an AIAnimationExtender. For Mixamo animations, use the supplied MixamoAIAnimationExtender script provided with RAIN. You may also write your own AIAnimationExtender to link motion control to your custom animation rig. More...

Inheritance diagram for RAIN.Motion.AIAnimationController:
RAIN.Motion.AvatarController RAIN.Animation.IAnimationRequestHandler RAIN.Core.RAINComponent

List of all members.

Classes

class  AnimationMap
 AnimationMap is used to map an animation state to a set of motion parameters that help RAIN to determine when to transition to a given state. More...

Public Member Functions

void Start ()
 Standard Unity Start() callback. Initializes components.
virtual void HandleAIAnimationStateTransition (AnimationParams animparams)
 Implementation of the IAnimationRequestHandler interface. Work is passed off to the Extender by calling extender.SetAnimationState.
virtual void AIRequest_StopAnimation ()
 Implementation of the IAnimationRequestHandler interface. Currenly a no-op.
virtual void HandleAIAnimationStateMovementOverride (AnimationParams animparams)
 A callback that is used to handled overrides to the animation map. Once called, the override state will take priority over the animation map until HandleAIAnimationStateMovementOverride is called again with a null state value.
override void UpdateFromAvatar (Agent agent, float deltaTime)
 See AvatarController.
override void CalculatePhysics (Agent agent, float deltaTime)
 See AvatarController.
override void ApplyPhysicsToAvatar (Agent agent, float deltaTime)
 See AvatarController for basic info. If the current selected animation is not a turning animation (isTurning is false) then rotation is applied. Speed is computed here and transmitted to animation through extender.SetAnimationSpeed.

Public Attributes

AnimationMap[] animationMap = new AnimationMap[0]
 The animation map.

Detailed Description

AIAnimationController is the motion controller for AI whose motion is driven by or strongly linked to animation. AIAnimationController requires the attachment of an AIAnimationExtender. For Mixamo animations, use the supplied MixamoAIAnimationExtender script provided with RAIN. You may also write your own AIAnimationExtender to link motion control to your custom animation rig.


Member Function Documentation

Implementation of the IAnimationRequestHandler interface. Currenly a no-op.

Implements RAIN.Animation.IAnimationRequestHandler.

override void RAIN.Motion.AIAnimationController.ApplyPhysicsToAvatar ( Agent  agent,
float  deltaTime 
) [virtual]

See AvatarController for basic info. If the current selected animation is not a turning animation (isTurning is false) then rotation is applied. Speed is computed here and transmitted to animation through extender.SetAnimationSpeed.

Parameters:
agent
deltaTime

Implements RAIN.Motion.AvatarController.

override void RAIN.Motion.AIAnimationController.CalculatePhysics ( Agent  agent,
float  deltaTime 
) [virtual]

See AvatarController.

Parameters:
agent
deltaTime

Implements RAIN.Motion.AvatarController.

A callback that is used to handled overrides to the animation map. Once called, the override state will take priority over the animation map until HandleAIAnimationStateMovementOverride is called again with a null state value.

Parameters:
animationStateThe animationState to use

Implements RAIN.Animation.IAnimationRequestHandler.

Implementation of the IAnimationRequestHandler interface. Work is passed off to the Extender by calling extender.SetAnimationState.

Parameters:
animationStateThe animation state to transition to

Implements RAIN.Animation.IAnimationRequestHandler.

Standard Unity Start() callback. Initializes components.

override void RAIN.Motion.AIAnimationController.UpdateFromAvatar ( Agent  agent,
float  deltaTime 
) [virtual]

See AvatarController.

Parameters:
agent
deltaTime

Implements RAIN.Motion.AvatarController.


Member Data Documentation

The animation map.