Difference between revisions of "PRIM PHYSICS MATERIAL"

From Second Life Wiki
Jump to navigation Jump to search
m
m
Line 4: Line 4:


{{#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}}
{{#vardefine:p_gravity_multiplier_desc|between -1.0 and +28.0}}
{{#vardefine:p_gravity_multiplier_desc|range {{Interval|gte=-1.0|center=gravity_multiplier|lte=+28.0}}}}
{{#vardefine:p_restitution_desc|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)}}
{{#vardefine:p_restitution_desc|range {{Interval|gte=0.0|center=restitution|lte=1.0}}}}
{{#vardefine:p_friction_desc|between 0.0 and 255.0}}
{{#vardefine:p_friction_desc|range {{Interval|gte=0.0|center=friction|lte=255.0}}}}
{{#vardefine:p_density_desc|between 1.0 and 22587.0 (in [[llGetMassMKS|kg]]/m^3)}}
{{#vardefine:p_density_desc|range {{Interval|gte=1.0|center=density|lte=22587.0}} [[llGetMassMKS|kg]]/m^3}}


{{#vardefine:p_material_bits_hover|bitwise combination of DENSITY, FRICTION, RESTITUTION, and GRAVITY_MULTIPLIER and specifies which floats to actually apply}}
{{#vardefine:p_material_bits_hover|bitwise combination of DENSITY, FRICTION, RESTITUTION, and GRAVITY_MULTIPLIER and specifies which floats to actually apply}}
{{#vardefine:p_gravity_multiplier_hover|between -1.0 and +28.0}}
{{#vardefine:p_gravity_multiplier_hover|range -1.0 to +28.0}}
{{#vardefine:p_restitution_hover|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)}}
{{#vardefine:p_restitution_hover|range 0.0 to 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)}}
{{#vardefine:p_friction_hover|between 0.0 and 255.0}}
{{#vardefine:p_friction_hover|range 0.0 to 255.0}}
{{#vardefine:p_density_hover|between 1.0 and 22587.0 (in kg/m^3)}}
{{#vardefine:p_density_hover|range 1.0 to 22587.0 (in kg/m^3)}}
 
{{#vardefine:caveats|{{#var:caveats}}
* A collision between two objects with restitution 1.0 will still not be perfectly elastic due to damping in the physics engine
}}


}}</onlyinclude>{{#if:
}}</onlyinclude>{{#if:

Revision as of 11:39, 20 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 range [-1.0, +28.0]
• float restitution range [0.0, 1.0]
• float friction range [0.0, 255.0]
• float density range [1.0, 22587.0] kg/m^3

When used with llSetPrimitiveParams & llSetLinkPrimitiveParams

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 range [-1.0, +28.0]
• float restitution range [0.0, 1.0]
• float friction range [0.0, 255.0]
• float density range [1.0, 22587.0] kg/m^3

Caveats

  • A collision between two objects with restitution 1.0 will still not be perfectly elastic due to damping in the physics engine


Deep Notes

History

Search JIRA for related Issues

Footnotes

  1. ^ The ranges in this article are written in Interval Notation.

Signature

integer PRIM_PHYSICS_MATERIAL = 31;