Difference between revisions of "LlGetPhysicsMaterial"

From Second Life Wiki
Jump to navigation Jump to search
m (Category sort key)
m (This is how DefineRow is supposed to be used... sorta)
Line 1: Line 1:
''NOTE: This article is a stub. Content taken from [[Release Notes/Second Life Server/11#11.09.23.241511]]''
{{LSL Function
 
|inject-2=
list llGetPhysicsMaterial() -- returns a list of the form [float gravity_multiplier, float restitution, float friction, float density]
<!-- caveats & parameter descriptions imported from PRIM_PHYSICS_MATERIAL article -->
 
{{:PRIM_PHYSICS_MATERIAL}}
[[Category:LSL Physics|GetPhysicsMaterial]]
|func=llGetPhysicsMaterial
[[Category:LSL Functions|GetPhysicsMaterial]]
|func_id=?
|func_desc=Used to get the physical characteristics of an object.
|return_type=list
|return_text=in the form [&nbsp;[[float]] {{LSL Param|gravity_multiplier}}, [[float]] {{LSL Param|restitution}}, [[float]] {{LSL Param|friction}}, [[float]] {{LSL Param|density}}&nbsp;]
{{{!}}
{{LSL DefineRow|float|gravity_multiplier|{{#var:p_gravity_multiplier_desc}}}}
{{LSL DefineRow|float|restitution|{{#var:p_restitution_desc}}}}
{{LSL DefineRow|float|friction|{{#var:p_friction_desc}}}}
{{LSL DefineRow|float|density|{{#var:p_density_desc}}}}
{{!}}}
|history=Content taken from [[Release Notes/Second Life Server/11#11.09.23.241511]]''
|cat1=Physics
}}

Revision as of 10:58, 20 January 2012

Summary

Function: list llGetPhysicsMaterial( );

Used to get the physical characteristics of an object.
Returns a list in the form [ float gravity_multiplier, float restitution, float friction, float density ]

• float gravity_multiplier range [-1.0, +28.0], default: 1.0
• float restitution range [0.0, 1.0], default: [0.3, 0.9] [1]
• float friction range [0.0, 255.0], default: [0.2, 0.9][1]
• float density range [1.0, 22587.0] kg/m^3, default: 1000.0

The default values for friction and restitution depend upon the material type.

Caveats

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

Examples

Deep Notes

History

Content taken from Release Notes/Second Life Server/11#11.09.23.241511

Footnotes

  1. ^ The default values for friction and restitution depend upon the prim's material.
  2. ^ The ranges in this article are written in Interval Notation.

Signature

function list llGetPhysicsMaterial();