|
Base projectile class. Uses the ProjectileData class for properties of individual projectiles. More...
Public Member Functions | |
void | presimulate (float seconds=1.0f) |
Updates the projectile's positional and collision information. | |
Public Attributes | |
Physics | |
Point3F | initialPosition |
Starting position for the projectile. | |
Point3F | initialVelocity |
Starting velocity for the projectile. | |
Source | |
int | sourceObject |
ID number of the object that fired the projectile. | |
int | sourceSlot |
The sourceObject's weapon slot that the projectile originates from. | |
Static Public Attributes | |
static bool | isRenderable |
Disables rendering of all instances of this type. | |
static bool | isSelectable |
Disables selection of all instances of this type. |
Base projectile class. Uses the ProjectileData class for properties of individual projectiles.
void Projectile::presimulate | ( | float | seconds = 1.0f |
) |
Updates the projectile's positional and collision information.
This function will first delete the projectile if it is a server object and is outside it's ProjectileData::lifetime. Also responsible for applying gravity, determining collisions, triggering explosions, emitting trail particles, and calculating bounces if necessary.
seconds | Amount of time, in seconds since the simulation's start, to advance. |
// Tell the projectile to process a simulation event, and provide the amount of time // that has passed since the simulation began. %seconds = 2.0; %projectile.presimulate(%seconds);
Point3F Projectile::initialPosition |
Starting position for the projectile.
Point3F Projectile::initialVelocity |
Starting velocity for the projectile.
bool Projectile::isRenderable [static] |
Disables rendering of all instances of this type.
Reimplemented from GameBase.
bool Projectile::isSelectable [static] |
Disables selection of all instances of this type.
Reimplemented from GameBase.
ID number of the object that fired the projectile.
The sourceObject's weapon slot that the projectile originates from.