rmp::behavior::Orbit
Circles a handle or a point: a shield of blades, a moon, a fairy. Several on one centre spread around it evenly with index and of.
From the editor: "radius" (Float), "speed" (Float, degrees_per_second), "angle" (Float).
Added to an object with add<rmp::behavior::Orbit>(); the framework calls its _late_update with the object it is on.
Fields
| Field | Type | Default | What it is |
|---|---|---|---|
centre | Handle<Object> | What it circles, while it is there | |
point | Vector2 | {} | What it circles without a centre |
radius | float | 48 | Units from the centre |
degrees_per_second | float | 90 | Negative turns the other way |
angle | float | 0 | Degrees, where it is now; it is where it starts too |
face | Face | Face::NONE | Which way it turns its object as it goes round |
index | int | 0 | This one's place among |
of | int | 1 | How many share the centre, spread evenly |
from
A Orbit with the fields the map's entity has by these names — radius, speed, angle — and the defaults for the rest. See "FROM THE EDITOR" at the top of this file.