MoveToTarget is an Action that attempts to use Instantaneous steering behaviors SB_Arrive and SB_Face to move toward the position identified by ContextItems.MOVE_TARGET. More...
Public Member Functions | |
override ActionResult | Start (Agent agent, float deltaTime) |
Start is called by an Action Executor one time prior to calling consecutive Execute calls. | |
override ActionResult | Execute (Agent agent, float deltaTime) |
Execute is called by an Action Executor to perform the work of the Action. An Action can run to completion, but will typically perform only the work for a single timestep, then continue at the next timestep for long running actions. | |
override ActionResult | Stop (Agent agent, float deltaTime) |
Stop is called to support cleanup and termination of execution activites. Stop should always be called by the Action Executor after a Start, regardless of the SUCCESS or FAILURE of any Execute calls. | |
Public Attributes | |
const string | ACTION_NAME = "MoveToTarget" |
float | timeToTarget = 0f |
How long in the future do we want to arrive? | |
float | slowDistance = 0f |
How close do we get before we start slowing down? | |
float | closeEnoughDistance = 0.1f |
How close is good enough? | |
float | timeToRotationTarget = Time.fixedDeltaTime |
How long should we take to get to our rotation target? | |
float | slowRadius = 10f |
How close do we get before we start slowing down (rotation degrees)? | |
float | closeEnoughRadius = 3.0f |
How close do we have to be (rotation degrees)? | |
float | faceBeforeMoveAngle = 90f |
How close do we have to be facing the target before we allow linear movement? |
MoveToTarget is an Action that attempts to use Instantaneous steering behaviors SB_Arrive and SB_Face to move toward the position identified by ContextItems.MOVE_TARGET.
override ActionResult RAIN.Path.MoveToTarget.Execute | ( | Agent | agent, |
float | deltaTime | ||
) | [virtual] |
Execute is called by an Action Executor to perform the work of the Action. An Action can run to completion, but will typically perform only the work for a single timestep, then continue at the next timestep for long running actions.
agent | The AI agent owning this action |
deltaTime | timestep in seconds |
Reimplemented from RAIN.Action.Action.
override ActionResult RAIN.Path.MoveToTarget.Start | ( | Agent | agent, |
float | deltaTime | ||
) | [virtual] |
Start is called by an Action Executor one time prior to calling consecutive Execute calls.
agent | The AI agent owning this action |
deltaTime | timestep in seconds |
Reimplemented from RAIN.Action.Action.
override ActionResult RAIN.Path.MoveToTarget.Stop | ( | Agent | agent, |
float | deltaTime | ||
) | [virtual] |
Stop is called to support cleanup and termination of execution activites. Stop should always be called by the Action Executor after a Start, regardless of the SUCCESS or FAILURE of any Execute calls.
agent | The AI agent owning this action |
deltaTime | timestep in seconds |
Reimplemented from RAIN.Action.Action.
float RAIN.Path.MoveToTarget.closeEnoughDistance = 0.1f |
How close is good enough?
float RAIN.Path.MoveToTarget.closeEnoughRadius = 3.0f |
How close do we have to be (rotation degrees)?
float RAIN.Path.MoveToTarget.faceBeforeMoveAngle = 90f |
How close do we have to be facing the target before we allow linear movement?
float RAIN.Path.MoveToTarget.slowDistance = 0f |
How close do we get before we start slowing down?
float RAIN.Path.MoveToTarget.slowRadius = 10f |
How close do we get before we start slowing down (rotation degrees)?
float RAIN.Path.MoveToTarget.timeToRotationTarget = Time.fixedDeltaTime |
How long should we take to get to our rotation target?
float RAIN.Path.MoveToTarget.timeToTarget = 0f |
How long in the future do we want to arrive?