Skip to content
lsl.devlsl.devLSL Dev

llGetPhysicsMaterial

function
Function syntax
list llGetPhysicsMaterial();
Returns
list
Energy
10

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]
  • float — friction — range [0.0, 255.0], default: [0.2, 0.9]
  • float — density — range [1.0, 22587.0] kg/m^3, default: 1000.0
How to use
list result = llGetPhysicsMaterial();
Example 1
default
{
touch_start(integer total_number)
{
list params = llGetPhysicsMaterial();
llOwnerSay(
"\nGravity multiplier: " + (string)llList2Float(params, 0) +
"\nRestitution: " + (string)llList2Float(params, 1) +
"\nFriction: " + (string)llList2Float(params, 2) +
"\nDensity: " + (string)llList2Float(params, 3) + "kg/m^3"
);
}
}

Date of Release 23/09/2011

Original wiki source

Some wiki templates and tables need their original context. View this article on the Second Life Wiki. Technical wording and examples are retained from the source; historical guidance may differ from current behavior.