On this page
  1. Fields
    1. from

rmp::behavior::Orbit

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

FieldTypeDefaultWhat it is
centreHandle<Object>

What it circles, while it is there

pointVector2{}

What it circles without a centre

radiusfloat48

Units from the centre

degrees_per_secondfloat90

Negative turns the other way

anglefloat0

Degrees, where it is now; it is where it starts too

faceFaceFace::NONE

Which way it turns its object as it goes round

indexint0

This one's place among of on the same centre

ofint1

How many share the centre, spread evenly

from

static Orbit from(const MapObject &object)

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.