Skip to content

Latest commit

 

History

History
116 lines (79 loc) · 3.27 KB

RigidShape.rst

File metadata and controls

116 lines (79 loc) · 3.27 KB

RigidShape

Implements rigid-body physics for DTS objects in the world.

Inherit:

ShapeBase

Description

The RigidShape class implements rigid-body physics for DTS objects in the world.

"Rigid body physics" refers to a system whereby objects are assumed to have a finite size, equally distributed masses, and where deformations of the objects themselves are not accounted for. Uses the RigidShape class to control its physics.

Example:

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;
};

 new RigidShape()
{
   dataBlock = "BouncingBoulder";
   parentGroup = EWCreatorWindow.objectGroup;
};

Methods