|
Stores properties for an individual debris type. More...
Public Attributes | |
Physical Properties | |
float | baseRadius |
Radius at which the standard elasticity and friction apply. | |
int | bounceVariance |
Allowed variance in the value of numBounces. | |
float | elasticity |
A floating-point value specifying how 'bouncy' this object is. | |
float | friction |
A floating-point value specifying how much velocity is lost to impact and sliding friction. | |
float | gravModifier |
How much gravity affects debris. | |
float | lifetime |
Amount of time until this debris object is destroyed. | |
float | lifetimeVariance |
Allowed variance in the value of lifetime. | |
float | maxSpinSpeed |
Maximum speed that this debris object will rotate. | |
float | minSpinSpeed |
Minimum speed that this debris object will rotate. | |
int | numBounces |
How many times to allow this debris object to bounce until it either explodes, becomes static or snaps (defined in explodeOnMaxBounce, staticOnMaxBounce, snapOnMaxBounce). | |
float | terminalVelocity |
Max velocity magnitude. | |
bool | useRadiusMass |
Use mass calculations based on radius. | |
float | velocity |
Speed at which this debris object will move. | |
float | velocityVariance |
Allowed variance in the value of velocity. | |
Datablocks | |
ParticleEmitterData | emitters [2] |
List of particle emitters to spawn along with this debris object. | |
ExplosionData | Explosion |
ExplosionData to spawn along with this debris object. | |
Behavior | |
bool | explodeOnMaxBounce |
If true, this debris object will explode after it has bounced max times. | |
bool | fade |
If true, this debris object will fade out when destroyed. | |
bool | ignoreWater |
If true, this debris object will not collide with water, acting as if the water is not there. | |
bool | snapOnMaxBounce |
If true, this debris object will snap into a resting position on the last bounce. | |
bool | staticOnMaxBounce |
If true, this debris object becomes static after it has bounced max times. | |
Display | |
filename | shapeFile |
Object model to use for this debris object. | |
string | texture |
Texture imagemap to use for this debris object. |
Stores properties for an individual debris type.
DebrisData defines the base properties for a Debris object. Typically you'll want a Debris object to consist of a shape and possibly up to two particle emitters. The DebrisData datablock provides the definition for these items, along with physical properties and how a Debris object will react to other game objects, such as water and terrain.
datablock DebrisData(GrenadeDebris) { shapeFile = "art/shapes/weapons/ramrifle/debris.dts"; emitters[0] = GrenadeDebrisFireEmitter; elasticity = 0.4; friction = 0.25; numBounces = 3; bounceVariance = 1; explodeOnMaxBounce = false; staticOnMaxBounce = false; snapOnMaxBounce = false; minSpinSpeed = 200; maxSpinSpeed = 600; lifetime = 4; lifetimeVariance = 1.5; velocity = 15; velocityVariance = 5; fade = true; useRadiusMass = true; baseRadius = 0.3; gravModifier = 1.0; terminalVelocity = 20; ignoreWater = false; };
float DebrisData::baseRadius |
Radius at which the standard elasticity and friction apply.
Only used when useRaduisMass is true.
float DebrisData::elasticity |
A floating-point value specifying how 'bouncy' this object is.
Must be in the range of -10 to 10.
List of particle emitters to spawn along with this debris object.
These are optional. You could have Debris made up of only a shape.
If true, this debris object will explode after it has bounced max times.
Be sure to provide an ExplosionData datablock for this to take effect.
ExplosionData to spawn along with this debris object.
This is optional as not all Debris explode.
bool DebrisData::fade |
If true, this debris object will fade out when destroyed.
This fade occurs over the last second of the Debris' lifetime.
float DebrisData::friction |
A floating-point value specifying how much velocity is lost to impact and sliding friction.
Must be in the range of -10 to 10.
float DebrisData::gravModifier |
How much gravity affects debris.
If true, this debris object will not collide with water, acting as if the water is not there.
float DebrisData::lifetime |
Amount of time until this debris object is destroyed.
Must be in the range of 0 to 1000.
float DebrisData::maxSpinSpeed |
Maximum speed that this debris object will rotate.
Must be in the range of -10000 to 10000.
float DebrisData::minSpinSpeed |
Minimum speed that this debris object will rotate.
Must be in the range of -10000 to 1000, and must be less than maxSpinSpeed.
How many times to allow this debris object to bounce until it either explodes, becomes static or snaps (defined in explodeOnMaxBounce, staticOnMaxBounce, snapOnMaxBounce).
Must be within the range of 0 to 10000.
filename DebrisData::shapeFile |
Object model to use for this debris object.
This shape is optional. You could have Debris made up of only particles.
If true, this debris object will snap into a resting position on the last bounce.
If true, this debris object becomes static after it has bounced max times.
Max velocity magnitude.
string DebrisData::texture |
Texture imagemap to use for this debris object.
Not used any more.
Use mass calculations based on radius.
Allows for the adjustment of elasticity and friction based on the Debris size.
float DebrisData::velocity |
Speed at which this debris object will move.