# rmp::behavior::Follow

> Chases a handle, with a speed and a distance it stops at.

Source: https://omardev29.github.io/rmp-docs/reference/behaviors/Follow.html

behavior `#include <rmp/behavior.h>` [include/rmp/behavior.h:266](https://github.com/omardev29/raylib_multiplatform/blob/982bf2a1e307c49776bff84211260703b8de6895/include/rmp/behavior.h#L266-L273)

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 |
