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...
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. |
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.
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.
agent | The agent owning this AvatarController |
deltaTime | Timestep 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.
agent | The agent owning this AvatarController |
deltaTime | Timestep in seconds |
Implemented in RAIN.Motion.AIAnimationController, RAIN.Motion.AICharacterController, RAIN.Motion.AIKinematicController, and RAIN.Motion.AIMixamoAnimationController.
bool RAIN.Motion.AvatarController.disabled = false |
Set to true to temporarily disable movement functions.