GetLimbName( objectId, limbId ) -- returns a string containing the limb name for the specified limbId or nil if no limb found. ***** Physics functions (Use physlib.lua functions to simplify use of most of these functions!) ***** These descriptions are for those who are familiar with the Bullet Physics Engine PushObject( objectId, vx, vy, vz, rx, ry, rz ) -- Applies a force to an object, vx, vy, vz is a vector defining the direction and amplitude -- rx, ry, rz is the relative offset on the object where the force is applied ConstrainObjMotion( objectId, cx, cy, cz ) -- Constrains an objects motion, cx, cy, cz are the constraint values on each world axis -- the simplest use of this is with values of 0 or 1, i.e a value of 1 is free motion on that axis -- a value of 0 doesn't allow any motion on that axis ConstrainObjRotation( objectId, rx, ry, rz ) -- Constrains an objects rotation, rx, ry, rz are the constraint values on each world axis -- the simplest use of this is with values of 0 or 1, i.e a value of 1 is free rotation on that axis -- a value of 0 doesn't allow any rotation on that axis SetObjectDamping( objectId, mv, rv ) -- Applies a damping amount to an object (drag iow), mv is motion damping amount, rv is rotation damping amount -- a value of 0 is no damping, 1 is maximum damping SetBodyScaling( objectId, sx, sy, sz ) -- Scales an objects collision shape, sx, sy, sz are the scaling factors in each axis. -- for example values of 0.95 would make the objects collision shape 95% of its visible shape. PhysicsRayCast( fromX, fromY, fromZ, toX, toY, toZ, force ) -- Works the same way as the normal ray casting except only applies to dynamic physics objects -- Returns 4 values: objectId of ray hit and x, y, z location of the collision point -- if the 'force' value is not 0 then the object hit will also get 'pushed' in the direction of the ray ***** Physics constraint creation functions CreateSingleHinge( objectId, x, y, z, hingeType, minAng, maxAng ) -- Creates a physics 'hinge' constraint between the object and the world -- returns an identifier of the constraint (constId) or -1 if constraint creation fails CreateSingleJoint( objectId, x, y, z ) -- Creates a physics 'joint' constraint between the object and the world -- returns an identifier of the constraint (constId) or -1 if constraint creation fails CreateDoubleHinge( objectIdA, objectIdB, xa, ya, za, xb, yb, zb, hingeTypeA, hingeTypeB, noCols ) -- Creates a physics 'hinge' constraint between two objects -- returns an identifier of the constraint (constId) or -1 if constraint creation fails CreateDoubleJoint( objectIdA, objectIdB, xa, ya, za, xb, yb, zb, noCols ) -- Creates a physics 'joint' constraint between two objects -- returns an identifier of the constraint (constId) or -1 if constraint creation fails CreateSliderDouble( objectIdA, objectIdB, qXa, qYa, qZa, qWa, xa, ya, za, qXb, qYb, qZb, qWb, xb, yb, zb, useLinearReferenceFrameA ) -- Creates a physics 'slider' constraint between two objects -- returns an identifier of the constraint (constId) or -1 if constraint creation fails RemoveObjectConstraints( objectId ) -- Removes all physics constraints from an object RemoveConstraint( constId ) -- Remove a specified constraint ***** Physics constraint control functions SetHingeLimits( constId, minAng, maxAng, softness, bias, relaxation ) -- Changes the values for a specified hinge constraint GetHingeAngle( constId ) -- returns the current angle value of a hinge constraint in radians SetHingeMotor( constId, speed, angle, force ) -- Set a motor for a specified hinge constraint SetSliderMotor( constId, OnOff, force, velocity ) -- Set a motor for a specified slider constraint GetSliderPosition( constId ) -- returns the current position value of a slider constraint SetSliderLimits( constId, lowerLimit, upperLimit, lowerAngle, upperAngle ) -- Set the limits on a slider constraint ***** Physics Collision detection functions (use the physlib functions to access these as they are more useful) AddObjectCollisionCheck( objectId ) RemoveObjectCollisionCheck( objectId ) GetObjectNumCollisions( objectId ) -- returns the number of colisions with other objects that were detected for an object since the last call GetObjectCollisionDetails( objectId, num ) -- returns the specified collision details or the first one if num not specified: -- objectId - the object it hit -- x, y, z - world position of the collision -- force - how hard the two objects collided (this is a very small number usually) GetTerrainNumCollisions( objectId ) -- returns the number of colisions with the terrain were detected for an object since the last call GetTerrainCollisionDetails( objectId, num ) -- returns the specified collision details or the first one if num not specified: -- latest - flag indicating if this was the most recent collision -- x, y, z - world position of the collision