Attention: Here be dragons

This is the latest (unstable) version of this documentation, which may document features not available in or compatible with released stable versions.

Projectile🔗

Inherits: Node3D

Inherited By: ChainGunProjectile, ExplosiveProjectile

This class defines a projectile.

Properties🔗

float

speed

42.0

float

lifespan

0.0

int

knockback

int

damage

Node

source

bool

deflectable

false

Vector3

inheritance

Vector3(0, 0, 0)

ShapeCast3D

shape_cast

null

Vector3

velocity

Vector3(0, 0, 0)

Methods🔗

void

_init()

void

destroy(_location: Vector3 = global_position)

void

_physics_process(delta: float)


Constants🔗

_speed_of_light = 299792458 🔗

There is currently no description for this constant. Please help us by contributing one!


Property Descriptions🔗

float speed = 42.0 🔗

The initial speed when launched, measured in meters per second (m/s or mps).


float lifespan = 0.0 🔗

The time before it automatically self-destructs (never by default), measured in seconds (s).


int knockback 🔗

A knockback impulse applied to bodies it collides with, in Newtons.


int damage 🔗

The base amount of damage.


Node source 🔗

The source that launched this projectile.


bool deflectable = false 🔗

There is currently no description for this property. Please help us by contributing one!


Vector3 inheritance = Vector3(0, 0, 0) 🔗

There is currently no description for this property. Please help us by contributing one!


ShapeCast3D shape_cast = null 🔗

There is currently no description for this property. Please help us by contributing one!


Vector3 velocity = Vector3(0, 0, 0) 🔗

There is currently no description for this property. Please help us by contributing one!


Method Descriptions🔗

void _init() 🔗

There is currently no description for this method. Please help us by contributing one!


void destroy(_location: Vector3 = global_position) 🔗

There is currently no description for this method. Please help us by contributing one!


void _physics_process(delta: float) 🔗

There is currently no description for this method. Please help us by contributing one!