Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

We must llPush leeetle Avatar!

OctopusDropkick Sorbet
Registered User
Join date: 18 Jul 2008
Posts: 6
07-15-2009 11:28
Is anyone familiar with the range of applications for llPush?

Short story; I'm trying to create an attachment worn upon an owner avatar (this is for a toy), that detects collisions with other avatars (or objects, generally) and then gives a small push in the vector direction of the owner avatar's movement. Basically Bumper Avatars.

It's really finnicky. I've discovered that it's far from an exact science! I can push on occasion a range of objects made physical, but I can't seem to apply any sort of small push to other avatar friends.

Basically this

vector vel = (llGetVel() * PUSHMAGNIFIER);
llPushObject(llDetectedKey(0), vel, ZERO_VECTOR, FALSE);

Seems to push physical objects okay, but avatars, not a centimeter.

Anyone have a diagnosis for this?
Osprey Therian
I want capslocklock
Join date: 6 Jul 2004
Posts: 5,049
07-15-2009 12:16
I have nothing to add except that nowadays a great many parcels have push turned off (thinking of both your testing and potential customer service probs if you get it running).
Jack Abraham
Lantern By Day
Join date: 11 Apr 2008
Posts: 113
07-15-2009 12:31
You, too, now experience the joys of SVC-2513. In short, pushing avatars is borked.
Tali Rosca
Plywood Whisperer
Join date: 6 Feb 2007
Posts: 767
07-15-2009 12:53
You can generally llApplyImpulse, though that, too, is buggy: http://jira.secondlife.com/browse/SVC-2697

You usually want to multiply by llGetMass, by the way, to account for different size.
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
07-15-2009 12:56
according to that jira entry repeating the push seems to work (which would explain some weirdness I was seeing with a flight accelerator)
_____________________
|
| . "Cat-Like Typing Detected"
| . This post may contain errors in logic, spelling, and
| . grammar known to the SL populace to cause confusion
|
| - Please Use PHP tags when posting scripts/code, Thanks.
| - Can't See PHP or URL Tags Correctly? Check Out This Link...
| -
OctopusDropkick Sorbet
Registered User
Join date: 18 Jul 2008
Posts: 6
07-15-2009 13:33
Thanks for the replies. So it looks like there isn't much of a way to fix this at the moment. Shucks.
Day Oh
Registered User
Join date: 3 Feb 2007
Posts: 1,257
07-15-2009 13:39
Last time I had to deal with llPushObject, the size of of an attachment at which time it was attached affected its ability to push... I ended up giving my hud a really big invisible halo and got it working...
_____________________
OctopusDropkick Sorbet
Registered User
Join date: 18 Jul 2008
Posts: 6
07-15-2009 14:35
Yeah, I've read about the energy reserves in prims and such. I'm not fully sure how best to utilize this information, but I can push other prims just fine. It's amazing how complicated this is in retrospect (all the qualifying forces) but it is a physics engine so I guess I shouldn't be too surprised at some of the level of complexity.
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
07-15-2009 14:46
From: Tali Rosca
You usually want to multiply by llGetMass, by the way, to account for different size.

Not necessarily if you are only dealing with avatars. Avatars all have the same mass, regardless of attachments and appearance settings and such. But distance from the pusher should definitely be accounted for, as it changes the effect very sharply.
Tali Rosca
Plywood Whisperer
Join date: 6 Feb 2007
Posts: 767
07-15-2009 14:56
Size (as per appearance sliders) *does* influence the mass. It's based on the bounding box.

(And by the way, llGetObjectMass would be the one in this case, of course).