RAIN.Primitives.MoveAction Class Reference

MoveAction is a primitive used to specify a target location to move to, speed at which to move, and optionally an animation to play while moving. More...

Inheritance diagram for RAIN.Primitives.MoveAction:
RAIN.Action.Action

List of all members.

Public Member Functions

override ActionResult Start (Agent agent, float deltaTime)
 ActionResult.Start Sets up move and look targets from variables if necessary.
override ActionResult Execute (Agent agent, float deltaTime)
 ActionResult.Execute Move toward the move target, look at the look target.
override ActionResult Stop (Agent agent, float deltaTime)
 ActionResult.Stop Stops custom animation override if enabled.

Public Attributes

string moveContextVariableName = null
 If the movement target is a GameObject (Transform) then moveContextVariableName contains the name of the variable holding the game object. This may have been assigned by a DetectAction primitive.
string lookContextVariableName = null
 If the look target is a GameObject (Transform) then moveContextVariableName contains the name of the variable holding the game object. This may have been assigned by a DetectAction primitive.
MoveLookTarget moveTarget = null
 moveTarget is the MoveLookTarget (Vector or Transform) that is moved to
MoveLookTarget lookTarget = null
 lookTarget is the MoveLookTarget (Vector or Transform) that is face during movement
float moveSpeed = -1.0f
 moveSpeed is the target speed for movement. This is limited by the Agent's overall MaxSpeed
float lookSpeed = -1.0f
 lookSpeed is the target rotation speed for movement. This is limited by the Agent's overall MaxRotationRate
string animationOverride = null
 animationOverride is the animation state name of an animation that should be played during movement. If animation is driven by an AIAnimationController, this value will override the controller's normal animation. Leave null or blank if no custom animation is desired
float animationOverrideBaseSpeed = 1.0f
 animationOverrideBaseSpeed is the baseline speed of the animation state specified in animationOverride. The animation playback speed will be adjusted based on the difference between actual movement speed and this base speed

Detailed Description

MoveAction is a primitive used to specify a target location to move to, speed at which to move, and optionally an animation to play while moving.


Member Function Documentation

override ActionResult RAIN.Primitives.MoveAction.Execute ( Agent  agent,
float  deltaTime 
) [virtual]

ActionResult.Execute Move toward the move target, look at the look target.

Parameters:
agent
deltaTime
Returns:
SUCCESS if the Agent has reached the target, RUNNING otherwise

Reimplemented from RAIN.Action.Action.

override ActionResult RAIN.Primitives.MoveAction.Start ( Agent  agent,
float  deltaTime 
) [virtual]

ActionResult.Start Sets up move and look targets from variables if necessary.

Parameters:
agent
deltaTime
Returns:
SUCCESS

Reimplemented from RAIN.Action.Action.

override ActionResult RAIN.Primitives.MoveAction.Stop ( Agent  agent,
float  deltaTime 
) [virtual]

ActionResult.Stop Stops custom animation override if enabled.

Parameters:
agent
deltaTime
Returns:
SUCCESS

Reimplemented from RAIN.Action.Action.


Member Data Documentation

animationOverride is the animation state name of an animation that should be played during movement. If animation is driven by an AIAnimationController, this value will override the controller's normal animation. Leave null or blank if no custom animation is desired

animationOverrideBaseSpeed is the baseline speed of the animation state specified in animationOverride. The animation playback speed will be adjusted based on the difference between actual movement speed and this base speed

If the look target is a GameObject (Transform) then moveContextVariableName contains the name of the variable holding the game object. This may have been assigned by a DetectAction primitive.

lookSpeed is the target rotation speed for movement. This is limited by the Agent's overall MaxRotationRate

lookTarget is the MoveLookTarget (Vector or Transform) that is face during movement

If the movement target is a GameObject (Transform) then moveContextVariableName contains the name of the variable holding the game object. This may have been assigned by a DetectAction primitive.

moveSpeed is the target speed for movement. This is limited by the Agent's overall MaxSpeed

moveTarget is the MoveLookTarget (Vector or Transform) that is moved to