Difference between revisions of "LlPushObject"

From Second Life Wiki
Jump to navigation Jump to search
m (Group UUIDs not eligible to be pushed)
(Added a caveat about energy use per BUG-234232)
 
Line 17: Line 17:
*In no-push areas an object can only push its owner.
*In no-push areas an object can only push its owner.
*{{LSLP|ang_impulse}} is ignored when applying to agents or their attachments.
*{{LSLP|ang_impulse}} is ignored when applying to agents or their attachments.
*[[Energy]] use is calculated as magnitude of {{LSLP|impulse}} divided by 20,000.
*[[Energy]] is fully depleted by this function when either {{LSLP|impulse}} or {{LSLP|ang_impulse}} is nonzero.  If {{LSLP|impulse}} is nonzero, it will drain all energy in the object before {{LSLP|ang_impulse}} is processed, causing the push to be purely linear.
*The push impact is diminished with distance by a factor of distance cubed.
*The push impact is diminished with distance by a factor of distance cubed.
|constants
|constants

Latest revision as of 11:46, 15 August 2023

Summary

Function: llPushObject( key target, vector impulse, vector ang_impulse, integer local );

Applies impulse and ang_impulse to object target

• key target avatar or object UUID that is in the same region
• vector impulse Direction and force of push. Direction is affected by local.
• vector ang_impulse Rotational force.
• integer local boolean, if TRUE uses the local axis of target, if FALSE uses the region axis.

Caveats

  • Only works on land where Push is not restricted or where the script is owned by the land owner.
    • If the land is owned by a group, the scripted object must be deeded to the same group.
  • The effectiveness of Push is modulated by the amount of script energy available.
    • There is a simplified code snippet describing how Push is implemented in the Havok4 project and reveals some of the details of how the energy budget affects the final Push magnitude.
  • In no-push areas an object can only push its owner.
  • ang_impulse is ignored when applying to agents or their attachments.
  • Energy is fully depleted by this function when either impulse or ang_impulse is nonzero. If impulse is nonzero, it will drain all energy in the object before ang_impulse is processed, causing the push to be purely linear.
  • The push impact is diminished with distance by a factor of distance cubed.
All Issues ~ Search JIRA for related Bugs

Examples

// Pushes the collided object or avatar.
default
{
    collision_start(integer num_detected)
    {
        llPushObject(llDetectedKey(0),<0,0,100>, <0,0,100>, TRUE);
    }
}

Deep Notes

Search JIRA for related Issues

Signature

function void llPushObject( key target, vector impulse, vector ang_impulse, integer local );