rmp::behavior::Follow
struct Follow
Chases a handle, with a speed and a distance it stops at. A handle and not a pointer, because the thing being chased is exactly the thing most likely to die while being chased.
Added to an object with add<rmp::behavior::Follow>(); the framework calls its _update with the object it is on.
Fields
| Field | Type | Default | What it is |
|---|---|---|---|
target | Handle<Object> | What it chases; empty or gone = it keeps its velocity | |
speed | float | 150 | Units per second while chasing |
stop_distance | float | 0 | Within this many units of the target's centre it stops |
acceleration | float | 0 | 0 = instant |