PRIM PHYSICS

From Second Life Wiki
Revision as of 02:00, 25 November 2013 by KiraCodie Resident (talk | contribs) (added example of setting and getting the Prim Physics)
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Description

Constant: integer PRIM_PHYSICS = 3;

The integer constant PRIM_PHYSICS has the value 3

Used to get or set the object's physics status. When enabled the object responds to SL physics.

llSetPrimitiveParams

llSetPrimitiveParams([ PRIM_PHYSICS, integer boolean ]);
• integer boolean TRUE enables, FALSE disables

The same syntax applies to llSetLinkPrimitiveParams and llSetLinkPrimitiveParamsFast but with an additional prefixed link parameter in the function call.

llGetPrimitiveParams

llGetPrimitiveParams([ PRIM_PHYSICS ]);

Returns the list [ integer boolean ]

• integer boolean TRUE enables, FALSE disables

The same syntax applies to llGetLinkPrimitiveParams, but with an additional prefixed link parameter in the function call.

Caveats

  • calls to set PRIM_PHYSICS in attachments fail silently
All Issues ~ Search JIRA for related Bugs

Related Articles

Examples

<lsl>default {

   state_entry()
   {
       llSetPrimitiveParams([PRIM_PHYSICS, TRUE]); // makes the prim physical...
       
       if(llGetPrimitiveParams([PRIM_PHYSICS]) == TRUE) 
       {
           llSetText("Object is Physical", <1, 1, 1>, 1.0);
       }
       
       else
       {
           llSetText("Object is non-Physical", <1, 1, 1>, 1.0);
       }
   }

}</lsl>

Deep Notes

Search JIRA for related Issues

Signature

integer PRIM_PHYSICS = 3;