On this page
  1. Fields

rmp::behavior::Projectile

behavior #include <rmp/behavior.h> include/rmp/behavior.h:253
struct Projectile

Travels the way you pushed it and is discarded when it leaves or hits.

Added to an object with add<rmp::behavior::Projectile>(); the framework calls its _ready, _collision, _update with the object it is on.

Fields

FieldTypeDefaultWhat it is
speedfloat0

0 = keep whatever velocity it was given

destroy_on_hitbooltrue

Discarded on touching any object it collides with

destroy_on_wallboolfalse

Discarded when its centre is in a solid map cell