Torque 3D - Script Manual: PhysicsDebrisData Class Reference

TorqueScript

Main   Class List   Namespace List   Online

PhysicsDebrisData Class Reference
[Physics]

Defines the properties of a PhysicsDebris object. More...

Inheritance diagram for PhysicsDebrisData:

List of all members.

Public Attributes

void preload
 Loads some information to have readily available at simulation time.
Physical Properties

float angularDamping
 Value that reduces an object's rotational velocity over time.
float angularSleepThreshold
 Minimum rotational velocity before the shape can be put to sleep.
float buoyancyDensity
 The density of this shape for purposes of calculating buoyant forces.
float friction
 Coefficient of kinetic friction to be applied to the shape.
float lifetime
 Base time, in seconds, that debris persists after time of creation.
float lifetimeVariance
 Range of variation randomly applied to lifetime when debris is created.
float linearDamping
 Value that reduces an object's linear velocity over time.
float linearSleepThreshold
 Minimum linear velocity before the shape can be put to sleep.
float mass
 Value representing the mass of the shape.
float restitution
 Bounce coeffecient applied to the shape in response to a collision.
float staticFriction
 Coefficient of static friction to be applied to the shape.
float waterDampingScale
 Scale to apply to linear and angular dampening while underwater.
Display

bool castShadows
 Determines if the shape's shadow should be cast onto the environment.
filename shapeFile
 Path to the .DAE or .DTS file to use for this shape.

Detailed Description

Defines the properties of a PhysicsDebris object.

See also:
PhysicsDebris.

Member Data Documentation

Value that reduces an object's rotational velocity over time.

Larger values will cause velocity to decay quicker.

Minimum rotational velocity before the shape can be put to sleep.

This should be a positive value. Shapes put to sleep will not be simulated in order to save system resources.

Note:
The shape must be dynamic.

The density of this shape for purposes of calculating buoyant forces.

The result of the calculated buoyancy is relative to the density of the WaterObject the PhysicsDebris is within.

See also:
WaterObject::density

Determines if the shape's shadow should be cast onto the environment.

Coefficient of kinetic friction to be applied to the shape.

Kinetic friction reduces the velocity of a moving object while it is in contact with a surface. A larger coefficient will result in a larger reduction in velocity. A shape's friction should be smaller than it's staticFriction, but greater than 0.

Note:
This value is only applied while an object is in motion. For an object starting at rest, see PhysicsDebrisData::staticFriction

Base time, in seconds, that debris persists after time of creation.

Note:
A PhysicsDebris' lifetime multiplied by it's $pref::PhysicsDebris::lifetimeScale must be equal to or greater than 1.0.

Range of variation randomly applied to lifetime when debris is created.

Represents the maximum amount of seconds that will be added or subtracted to a shape's base lifetime. A value of 0 will apply the same lifetime to each shape created.

Value that reduces an object's linear velocity over time.

Larger values will cause velocity to decay quicker.

Minimum linear velocity before the shape can be put to sleep.

This should be a positive value. Shapes put to sleep will not be simulated in order to save system resources.

Note:
The shape must be dynamic.

Value representing the mass of the shape.

A shape's mass influences the magnitude of any force applied to it.

Note:
All PhysicsDebris objects are dynamic.

Loads some information to have readily available at simulation time.

Forces generation of shaders, materials, and other data used by the PhysicsDebris object. This function should be used while a level is loading in order to shorten the amount of time to create a PhysicsDebris in game.

Bounce coeffecient applied to the shape in response to a collision.

Restitution is a ratio of a shape's velocity before and after a collision. A value of 0 will zero out a shape's post-collision velocity, making it stop on contact. Larger values will remove less velocity after a collision, making it 'bounce' with greater force. Normal restitution values range between 0 and 1.0.

Note:
Values near or equaling 1.0 are likely to cause undesirable results in the physics simulation. Because of this, it is reccomended to avoid values close to 1.0

Path to the .DAE or .DTS file to use for this shape.

Compatable with Live-Asset Reloading.

Coefficient of static friction to be applied to the shape.

Static friction determines the force needed to start moving an at-rest object in contact with a surface. If the force applied onto shape cannot overcome the force of static friction, the shape will remain at rest. A higher coefficient will require a larger force to start motion. This value should be both greater than 0 and the PhysicsDebrisData::friction.

Note:
This value is only applied while an object is at rest. For an object in motion, see PhysicsDebrisData::friction

Scale to apply to linear and angular dampening while underwater.

See also:
angularDamping linearDamping


Copyright © GarageGames, LLC. All Rights Reserved.