STATUS PHYSICS
Looking for the current API? Open the STATUS_PHYSICS reference →
Wiki description
This property (set FALSE by default) if set TRUE allows that the object is subject to and can offer physical interactions and forces.
Examples
Simple script to turn on and off the physics of an object.
default
{
state_entry()
{
llSetTimerEvent(llFrand(10) + 5.0); // Set a random time in seconds between 5 and 15
}
timer()
{
if(!llGetStatus(STATUS_PHYSICS)) // Check the physical status is non-phys
{
llSetStatus(STATUS_PHYSICS, TRUE); // Set the object physical
llMoveToTarget(llGetPos() + <0.0,0.0,10.0>, 1.0); // Move to a point 10 meters above the present position
}
else // If physical
{
llSetStatus(STATUS_PHYSICS, FALSE); // Set the object non-phys
llSetTimerEvent(0.0); // Stop the timer
}
}
}See also: constants
|
|
|
See also: functions
Known issues
- SVC-6549: llSetStatus can't change STATUS_PHYSICS of an attachment despite the status being preserved between attach & drop
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.