Difference between revisions of "PRIM PHYSICS MATERIAL"

From Second Life Wiki
Jump to navigation Jump to search
m
m
Line 1: Line 1:
<onlyinclude>{{#if:
<onlyinclude>{{#if:


{{#vardefine:physics_material_const|{{LSL Const|PRIM_PHYSICS_MATERIAL|integer|31|c=Used to {{GetSet|{{{1|}}}|get|set|/}} the prim's physics material}}}}
{{#vardefine:physics_material_const|{{LSL Const|PRIM_PHYSICS_MATERIAL|integer|31|c=Used to {{GetSet|{{{1|}}}|get|set|/}} the prim's physics material properties}}}}


{{#vardefine:p_material_bits_desc|bitwise combination of [[DENSITY]], [[FRICTION]], [[RESTITUTION]], and [[GRAVITY_MULTIPLIER]] and specifies which floats to actually apply}}
{{#vardefine:p_material_bits_desc|bitwise combination of [[DENSITY]], [[FRICTION]], [[RESTITUTION]], and [[GRAVITY_MULTIPLIER]] and specifies which floats to actually apply}}
Line 22: Line 22:
|type=integer
|type=integer
|value=31
|value=31
|desc=PRIM_PHYSICS_MATERIAL is used to get or set the prim's physics material.
|desc=PRIM_PHYSICS_MATERIAL is used to get or set the prim's physics material properties.
|pa={{LSL Constant/List|i_front=[[llSetPrimitiveParams]]([&#32;{{#var:physics_material_const}},&#32;|i_end=&nbsp;]);
|pa={{LSL Constant/List|i_front=[[llSetPrimitiveParams]]([&#32;{{#var:physics_material_const}},&#32;|i_end=&nbsp;]);
|text=When used with [[llSetPrimitiveParams]] & [[llSetLinkPrimitiveParams]]
|text=When used with [[llSetPrimitiveParams]] & [[llSetLinkPrimitiveParams]]

Revision as of 11:03, 17 September 2011

Description

Constant: integer PRIM_PHYSICS_MATERIAL = 31;

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.

llSetPrimitiveParams

llSetPrimitiveParams([ PRIM_PHYSICS_MATERIAL, integer material_bits, float gravity_multiplier, float restitution, float friction, float density ]);
• integer material_bits bitwise combination of DENSITY, FRICTION, RESTITUTION, and GRAVITY_MULTIPLIER and specifies which floats to actually apply
• float gravity_multiplier between -1.0 and +28.0
• float restitution between 0.0 and 1.0 (note, a collision between two objects with restitution 1.0 will still not be perfectly elastic due to damping in the physics engine)
• float friction between 0.0 and 255.0
• float density between 1.0 and 22587.0 (in kg/m^3)

When used with llSetPrimitiveParams & llSetLinkPrimitiveParams All Issues ~ Search JIRA for related Bugs

llGetPrimitiveParams

llGetPrimitiveParams([ PRIM_PHYSICS_MATERIAL ]);

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

• integer material_bits bitwise combination of DENSITY, FRICTION, RESTITUTION, and GRAVITY_MULTIPLIER and specifies which floats to actually apply
• float gravity_multiplier between -1.0 and +28.0
• float restitution between 0.0 and 1.0 (note, a collision between two objects with restitution 1.0 will still not be perfectly elastic due to damping in the physics engine)
• float friction between 0.0 and 255.0
• float density between 1.0 and 22587.0 (in kg/m^3)

All Issues ~ Search JIRA for related Bugs

Deep Notes

History

Search JIRA for related Issues

Signature

integer PRIM_PHYSICS_MATERIAL = 31;