LSL feature request. The described constant does not exist. This article is a feature request.

The integer constant PRIM_PHYSICS_MATERIAL has the value 31

PRIM_PHYSICS_MATERIAL is used to get or set the prim's physics material properties.

Syntax

integer PRIM_PHYSICS_MATERIAL = 31;

Usage

llSetPrimitiveParams([ PRIM_PHYSICS_MATERIAL, integer material_bits, float gravity_multiplier, float restitution, float friction, float density ]);

integermaterial_bits
floatgravity_multiplierrange gravity_multiplier (≥ -1.0, ≤ +28.0), default: 1.0
floatrestitutionrange restitution (≥ 0.0, ≤ 1.0), default: restitution (≥ 0.3, ≤ 0.9) [1]
floatfrictionrange friction (≥ 0.0, ≤ 255.0), default: friction (≥ 0.2, ≤ 0.9)[1]
floatdensityrange density (≥ 1.0, ≤ 22587.0) kg/m^3, default: 1000.0

When used with llSetPrimitiveParams & llSetLinkPrimitiveParams

llGetPrimitiveParams([ PRIM_PHYSICS_MATERIAL ]);

Returns the list [ integer material_bits, float gravity_multiplier, float restitution, float friction, float density ]

integermaterial_bits
floatgravity_multiplierrange gravity_multiplier (≥ -1.0, ≤ +28.0), default: 1.0
floatrestitutionrange restitution (≥ 0.0, ≤ 1.0), default: restitution (≥ 0.3, ≤ 0.9) [1]
floatfrictionrange friction (≥ 0.0, ≤ 255.0), default: friction (≥ 0.2, ≤ 0.9)[1]
floatdensityrange density (≥ 1.0, ≤ 22587.0) kg/m^3, default: 1000.0
mask FlagsVDescription
DENSITY1Indicates that density parameter is enabled and will override the previous value.
FRICTION2Indicates that friction parameter is enabled and will override the previous value.
RESTITUTION4Indicates that restitution parameter is enabled and will override the previous value.
GRAVITY_MULTIPLIER8Indicates that gravity_multiplier parameter is enabled and will override the previous value.

Caveats

See also

Functions

Deep notes

History

Footnotes

  1. The default values for friction and restitution depend upon the prim's material.