SetSpritePhysicsMass

Description

This command overrides the calculated mass for this sprite and sets it to a value of your choice, in kilograms. Setting this too low or too high can cause an unstable simulation, especially if a very light object meets a very heavy object. The value range you should use depends on your chosen physics scale.

Internally a default mass per object is calculated based on its size. A 1m x 1m box would weigh 1 kg, so because of the default physics scale of 5, a 5 x 5 box in virtual units weighs 1 kg.

Definition

SetSpritePhysicsMass( iSpriteIndex, mass )

Parameters