RigidShapeData
Defines the physics properties for an individual RigidShapeData physics object.
Physics
bool
Creates a representation of the object in the physics plugin.
Forces
float
Used to simulate the constant drag acting on the object.
float
The scalar applied to the vertical portion of the velocity drag acting on a object.
Particle Effects
Array of pointers to ParticleEmitterData datablocks which will be used to emit particles at object/terrain contact point.
float
Maximum height from the ground at which the object will generate dust.
float
Height of dust effects.
Particle emitter used to create a dust trail for the moving object.
splashEmitter [2]
Array of pointers to ParticleEmitterData datablocks which will generate splash effects.
float
The simulated frequency modulation of a splash generated by this object. Multiplied along with speed and time elapsed when determining splash emition rate.
float
The threshold speed at which we consider the object's movement to have stopped when updating splash effects.
Sounds
Sound to play when body impacts with at least softImageSpeed but less than hardImpactSpeed.
Sound to play when body impacts with at least hardImpactSpeed.
float
The minimum velocity at which the exit splash sound will be played when emerging from water.
float
The minimum velocity at which the soft splash sound will be played when impacting water.
float
The minimum velocity at which the medium splash sound will be played when impacting water.
float
The minimum velocity at which the hard splash sound will be played when impacting water.
The AudioProfile will be used to produce sounds when emerging from water.
The AudioProfile will be used to produce sounds when a soft impact with water occurs.
The AudioProfile will be used to produce sounds when a medium impact with water occurs.
The AudioProfile will be used to produce sounds when a hard impact with water occurs.
The AudioProfile will be used to produce sounds when a water wake is displayed.
Camera
The settings used by the shape when it is the camera.
bool
Specifies whether the camera's rotation matrix, and the render eye transform are multiplied during camera updates.
float
Scalar amount by which the third person camera lags the object, relative to the object's linear velocity.
float
Scalar rate at which the third person camera offset decays, per tick.
float
The vertical offset of the object's camera.
Callbacks
void
onEnterLiquid(RigidShape obj, float coverage, string type)
Called when the vehicle enters liquid.
void
onLeaveLiquid(RigidShape obj, string type)
Called when the vehicle leaves liquid.
Public Attributes
float
How much friction this object has. Lower values will cause the object to appear to be more slippery.
float
The percentage of kinetic energy kept by this object in a collision.
float
Collision distance tolerance.
float
Contact velocity tolerance.
float
Minimum speed at which the object must be travelling for the hard impact sound to be played.
int
Number of physics steps to process per tick.
Point3F
Size of inertial box.
Point3F
Center of mass for rigid body.
float
Maximum drag available to this object.
float
Minimum drag available to this object.
float
Minimum collision speed to classify collision as impact (triggers onImpact on server object).
float
float
Minimum speed at which this object must be travelling for the soft impact sound to be played.
Detailed Description
Defines the physics properties for an individual RigidShapeData physics object.
datablock RigidShapeData( BouncingBoulder ) { category = "RigidShape"; shapeFile = "~/data/shapes/boulder/boulder.dts"; emap = true; // Rigid Body mass = 500; massCenter = "0 0 0"; // Center of mass for rigid body massBox = "0 0 0"; // Size of box used for moment of inertia, // if zero it defaults to object bounding box drag = 0.2; // Drag coefficient bodyFriction = 0.2; bodyRestitution = 0.1; minImpactSpeed = 5; // Impacts over this invoke the script callback softImpactSpeed = 5; // Play SoftImpact Sound hardImpactSpeed = 15; // Play HardImpact Sound integration = 4; // Physics integration: TickSec/Rate collisionTol = 0.1; // Collision distance tolerance contactTol = 0.1; // Contact velocity tolerance minRollSpeed = 10; maxDrag = 0.5; minDrag = 0.01; dustHeight = 10; dragForce = 0.05; vertFactor = 0.05; };
Physics
bool enablePhysicsRep
Creates a representation of the object in the physics plugin.
Forces
float dragForce
Used to simulate the constant drag acting on the object.
float vertFactor
The scalar applied to the vertical portion of the velocity drag acting on a object.
Particle Effects
ParticleEmitterData dustEmitter
Array of pointers to ParticleEmitterData datablocks which will be used to emit particles at object/terrain contact point.
float triggerDustHeight
Maximum height from the ground at which the object will generate dust.
float dustHeight
Height of dust effects.
ParticleEmitterData dustTrailEmitter
Particle emitter used to create a dust trail for the moving object.
ParticleEmitterData splashEmitter [2]
Array of pointers to ParticleEmitterData datablocks which will generate splash effects.
float splashFreqMod
The simulated frequency modulation of a splash generated by this object. Multiplied along with speed and time elapsed when determining splash emition rate.
float splashVelEpsilon
The threshold speed at which we consider the object's movement to have stopped when updating splash effects.
Sounds
SFXTrack softImpactSound
Sound to play when body impacts with at least softImageSpeed but less than hardImpactSpeed.
SFXTrack hardImpactSound
Sound to play when body impacts with at least hardImpactSpeed.
float exitSplashSoundVelocity
The minimum velocity at which the exit splash sound will be played when emerging from water.
float softSplashSoundVelocity
The minimum velocity at which the soft splash sound will be played when impacting water.
float mediumSplashSoundVelocity
The minimum velocity at which the medium splash sound will be played when impacting water.
float hardSplashSoundVelocity
The minimum velocity at which the hard splash sound will be played when impacting water.
SFXTrack exitingWater
The AudioProfile will be used to produce sounds when emerging from water.
SFXTrack impactWaterEasy
The AudioProfile will be used to produce sounds when a soft impact with water occurs.
SFXTrack impactWaterMedium
The AudioProfile will be used to produce sounds when a medium impact with water occurs.
SFXTrack impactWaterHard
The AudioProfile will be used to produce sounds when a hard impact with water occurs.
SFXTrack waterWakeSound
The AudioProfile will be used to produce sounds when a water wake is displayed.
Camera
The settings used by the shape when it is the camera.
bool cameraRoll
Specifies whether the camera's rotation matrix, and the render eye transform are multiplied during camera updates.
float cameraLag
Scalar amount by which the third person camera lags the object, relative to the object's linear velocity.
float cameraDecay
Scalar rate at which the third person camera offset decays, per tick.
float cameraOffset
The vertical offset of the object's camera.
Callbacks
onEnterLiquid(RigidShape obj, float coverage, string type)
Called when the vehicle enters liquid.
Parameters:
obj | the Vehicle object |
coverage | percentage of the vehicle's bounding box covered by the liquid |
type | type of liquid the vehicle has entered |
onLeaveLiquid(RigidShape obj, string type)
Called when the vehicle leaves liquid.
Parameters:
obj | the Vehicle object |
type | type of liquid the vehicle has left |
Public Attributes
float bodyFriction
How much friction this object has. Lower values will cause the object to appear to be more slippery.
float bodyRestitution
The percentage of kinetic energy kept by this object in a collision.
float collisionTol
Collision distance tolerance.
float contactTol
Contact velocity tolerance.
float hardImpactSpeed
Minimum speed at which the object must be travelling for the hard impact sound to be played.
int integration
Number of physics steps to process per tick.
Point3F massBox
Size of inertial box.
Point3F massCenter
Center of mass for rigid body.
float maxDrag
Maximum drag available to this object.
float minDrag
Minimum drag available to this object.
float minImpactSpeed
Minimum collision speed to classify collision as impact (triggers onImpact on server object).
float minRollSpeed
float softImpactSpeed
Minimum speed at which this object must be travelling for the soft impact sound to be played.