llSetPhysicsMaterial
void llSetPhysicsMaterial(integer MaterialBits, float GravityMultiplier, float Restitution, float Friction, float Density)Sets the selected parameters of the object's physics behavior.
MaterialBits is a bitmask specifying which of the parameters in the other arguments should be applied to the object. GravityMultiplier, Restitution, Friction, and Density are the possible parameters to manipulate.
Parameters
-
MaterialBits(integer) - A bitmask specifying which of the parameters in the other arguments should be applied to the object.
-
GravityMultiplier(float) -
Restitution(float) -
Friction(float) -
Density(float)
Basic Example
Section titled “Basic Example”llSetPhysicsMaterial(FRICTION, 1.0, 0.9, 0.1, 0.5); // Sets FRICTION to 0.1Multiple Settings
Section titled “Multiple Settings”llSetPhysicsMaterial(GRAVITY_MULTIPLIER | RESTITUTION | FRICTION | DENSITY, 0.5, 0.9, 0.1, 1.0);Caveats
Section titled “Caveats”- Using PRIM_MATERIAL to set the material type will reset the values for friction and restitution to that material’s defaults.
- llSetPhysicsMaterial silently fails if called from an attachment.
Material Defaults
Section titled “Material Defaults”Using PRIM_MATERIAL changes the values for friction and restitution to the values listed for the material type. llSetPhysicsMaterial cannot use material type flags.