RAIN.Motion.AvatarController Class Reference

AvatarController is the base class for all AIControllers in RAIN. When using or extending the controller, keep in mind that the controller methods are automatically called by a RAINAgent during Update and LateUpdate. UpdateFromAvatar is used to make your agent.Kinematic up to date before Think and Act calls occur. CalculatePhysics is used to update the Kinematic based on forces stored in Kinematic.Set/AddForces or Kinematic.Set/AddVelocity. ApplyPhysicsToAvatar is used to push Kinematic changes back to the game object. More...

Inheritance diagram for RAIN.Motion.AvatarController:
RAIN.Motion.AIAnimationController RAIN.Motion.AICharacterController RAIN.Motion.AIKinematicController RAIN.Motion.AIMixamoAnimationController RAIN.Motion.AIRigidBodyController

List of all members.

Public Member Functions

abstract void UpdateFromAvatar (Agent agent, float deltaTime)
 UpdateFromAvatar updates the agent Kinematic structure with the current values associated with the Avatar game object. This should happen as one of the first steps in calculating physics for an Agent.
abstract void CalculatePhysics (Agent agent, float deltaTime)
 CalculatePhysics recalculates kinematic values (position, orientation, velocity, rotation) based on stored forces. The agent Kinematic will be updated, but will not yet be applied to any associated avatar.
abstract void ApplyPhysicsToAvatar (Agent agent, float deltaTime)
 ApplyPhysicsToAvatar applies physical forces back to the game object representing the agent Avatar.

Public Attributes

bool disabled = false
 Set to true to temporarily disable movement functions.

Detailed Description

AvatarController is the base class for all AIControllers in RAIN. When using or extending the controller, keep in mind that the controller methods are automatically called by a RAINAgent during Update and LateUpdate. UpdateFromAvatar is used to make your agent.Kinematic up to date before Think and Act calls occur. CalculatePhysics is used to update the Kinematic based on forces stored in Kinematic.Set/AddForces or Kinematic.Set/AddVelocity. ApplyPhysicsToAvatar is used to push Kinematic changes back to the game object.


Member Function Documentation

abstract void RAIN.Motion.AvatarController.ApplyPhysicsToAvatar ( Agent  agent,
float  deltaTime 
) [pure virtual]

ApplyPhysicsToAvatar applies physical forces back to the game object representing the agent Avatar.

Implemented in RAIN.Motion.AIAnimationController, RAIN.Motion.AICharacterController, RAIN.Motion.AIKinematicController, and RAIN.Motion.AIMixamoAnimationController.

abstract void RAIN.Motion.AvatarController.CalculatePhysics ( Agent  agent,
float  deltaTime 
) [pure virtual]

CalculatePhysics recalculates kinematic values (position, orientation, velocity, rotation) based on stored forces. The agent Kinematic will be updated, but will not yet be applied to any associated avatar.

Parameters:
agentThe agent owning this AvatarController
deltaTimeTimestep in seconds

Implemented in RAIN.Motion.AIAnimationController, RAIN.Motion.AICharacterController, RAIN.Motion.AIKinematicController, and RAIN.Motion.AIMixamoAnimationController.

abstract void RAIN.Motion.AvatarController.UpdateFromAvatar ( Agent  agent,
float  deltaTime 
) [pure virtual]

UpdateFromAvatar updates the agent Kinematic structure with the current values associated with the Avatar game object. This should happen as one of the first steps in calculating physics for an Agent.

Parameters:
agentThe agent owning this AvatarController
deltaTimeTimestep in seconds

Implemented in RAIN.Motion.AIAnimationController, RAIN.Motion.AICharacterController, RAIN.Motion.AIKinematicController, and RAIN.Motion.AIMixamoAnimationController.


Member Data Documentation

Set to true to temporarily disable movement functions.