On this page
  1. Fields

rmp::behavior::Follow

behavior #include <rmp/behavior.h> include/rmp/behavior.h:266
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

FieldTypeDefaultWhat it is
targetHandle<Object>

What it chases; empty or gone = it keeps its velocity

speedfloat150

Units per second while chasing

stop_distancefloat0

Within this many units of the target's centre it stops

accelerationfloat0

0 = instant