llPushObject(key id, vector impulse, vector angular_impulse, integer local)
or avatar id
is a boolean
that specifies whether or not the push is relative to id
. If local
, whatever or whomever you're trying to push will move in the same direction, regardless of the target object/avatar's rotation.
relative to the rotation of the prim containing your script.
only works on avatars and physical
A heavier (more massive
) object will move another object more than a lighter object with the same impulse
applied. Similarly, a heavier object, when being pushed, will not go as far as a lighter object with the same impulse
. To have an object push different-sized objects at the same speed, multiply impulse
by the mass of the object being pushed. llGetObjectMass
can be used to obtain the mass of an object or avatar anywhere within the same sim.
There is no upper range limitation, but falloff is calculated by 1/r³
: the further this object is from id
, the weaker the push will be. The push will fall off proportional to the cube of the distance (radius) between the two objects.
Use this to calculate and counteract the falloff on a push:
Q: Does multiplying the velocity by the mass of the target also make up for the difference bettwen small and large pushers?
In practice it looks like vector impulse numbers over 2147483647 will push to a lesser degree even zero push (integer maximum -- curious!). I know at some stage in the past LL limited how hard llPushObject pushed; maybe they chose the integer maximum as a cutoff. Of course this doesn't stop you using multiple llPushObjects. ;)
Q: When using this function on an attachment is the mass of the pushing object used (larger object greater push) or the mass of the avatar?
Q: It seems when I use this call this function in a mega prim it doesn't work. I'm using the exact same script that works fine in a normal 10x10x10 so is this on purpose, or can you think of another reason why it wouldn't work?
Note that using this function to grief
other users will result in an abuse report being filed. If you want to remove someone from your land, use llEjectFromLand
is not to be used for that.
As of version 1.11.1 (1) of Second Life, pushing can be set to "restricted" on a parcel by the land owner. This stops llPushObject
from being used upon avatars other than the owner of the script
(self-pushing is still allowed). Scripts owned by the land owner can still use llPushObject on any avatar, and pushing of non-avatar objects is unaffected.
This article wasn't helpful for you? Maybe the related article at the LSL Portal
is able to bring enlightenment.