Difference between revisions of "LlSetPhysicsMaterial"

From Second Life Wiki
Jump to navigation Jump to search
m
m
Line 12: Line 12:
|p4_type=float|p4_name=friction
|p4_type=float|p4_name=friction
|p5_type=float|p5_name=density
|p5_type=float|p5_name=density
|also_functions=
{{LSL DefineRow||[[llGetPhysicsMaterial]]}}
|also_constants=
{{LSL DefineRow||[[PRIM_PHYSICS_MATERIAL]]}}
|cat1=Physics
|cat1=Physics
}}
}}

Revision as of 12:02, 20 January 2012

Summary

Function: llSetPhysicsMaterial( integer material_bits, float gravity_multiplier, float restitution, float friction, float density );

Used to set the physical characteristics of an object.

• integer material_bits
• 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.
All Issues ~ Search JIRA for related Bugs

Examples

See Also

Constants

•  PRIM_PHYSICS_MATERIAL

Functions

•  llGetPhysicsMaterial

Deep Notes

History

Content taken from Release Notes/Second Life Server/11#11.09.23.241511
Search JIRA for related Issues

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 void llSetPhysicsMaterial( integer material_bits, float gravity_multiplier, float restitution, float friction, float density );