# rmp::behavior::Projectile

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

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

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

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

| Field | Type | Default | What it is |
|---|---|---|---|
| `speed` | `float` | `0` | 0 = keep whatever velocity it was given |
| `destroy_on_hit` | `bool` | `true` | Discarded on touching any object it collides with |
| `destroy_on_wall` | `bool` | `false` | Discarded when its centre is in a solid map cell |
