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.
integer PRIM_PHYSICS = 3;
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([ 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.
default
{
state_entry()
{
llSetPrimitiveParams([PRIM_PHYSICS, TRUE]); // makes the object physical...
integer isPhysical = llList2Integer(llGetPrimitiveParams([PRIM_PHYSICS]), 0);
if( isPhysical == 1 )
{
llSetText("Object is Physical", <1, 1, 1>, 1.0);
}
else
{
llSetText("Object is non-Physical", <1, 1, 1>, 1.0);
}
}
}