Movement
From LoopBot
|
Move To Point
"Move To Point" permits movement to a specific X, Y, Z coordinate within a certain precision (that is, within so many yards of the point). Movement is possible in any MovementDirection.
Move For Time
"Move For Time" permits movement in any MovementDirection for a period of (int) seconds. Once the time limit has been reached, movement will stop.
- Consideration: Change (int) seconds to (double) milliseconds for more precise movement timing.
Stop Movement
"Stop Movement" stops the character from moving and facing.
Alternate Route Determination
In cases where paths to a given point are obstructed or a slope is impassable, alternate route determination evaluates several potential paths to a new point to avoid the obstruction. This determination occurs before movement to a point (see "Move To Point") begins.
Are We Stuck?
In rare cases a character may become stuck on an obstacle, we determine this condition if:
- We are in motion
- Our distance from our previous point has not change greater than 2 yards in the last 2 seconds
Several measures are taken to "un-stuck" himself:
- Jumping in Forward, Backward, Left, and Right directions
- Backup for one second, turn left, move forward for one second, turn right, move forward one second (if necessary)
- Backup for one second, turn right, move forward for one second, turn left, move forward one second (if necessary)
Are We Falling?
As per Junior's suggestion, if Me.Altitude > 0.5, we are falling.
