Kin Zaius
Junior Member
Join date: 30 Jan 2004
Posts: 4
|
11-04-2004 09:23
Ok, I know that there is a way to push objects (mostly used to push avatars) I was curious if there is any way to reverse the effect of that function, to pull an object instead.
Any ideas would be very helpful, or IM me in-world, tyvm.
|
Moleculor Satyr
Fireflies!
Join date: 5 Jan 2004
Posts: 2,650
|
11-04-2004 09:56
llPushObject is an omnidirectional function. It can push an object in any direction, including towards you.
_____________________
</sarcasm>
|
Dan Medici
Registered User
Join date: 25 Jan 2004
Posts: 132
|
11-04-2004 10:06
I think I did this a LONG time ago, can't you just subtract the object's position from the position of the object with the script, and then negate it? That should be the vector required to pull, you might want to multiply it though.
|
Cross Lament
Loose-brained Vixen
Join date: 20 Mar 2004
Posts: 1,115
|
11-04-2004 11:15
llVecNorm( llDetectedPos( 0 ) - llGetPos() ) will return the normal vector pointing FROM your location (or location of the task) TO a detected target location, ie. away from you. This is what you'd use to push things AWAY from you. llVecNorm( llGetPos() - llDetectedPos( 0 ) ) will return the normal vector pointing FROM the detected target location, TO your location (or the location of the task). This is what you'd use to push things TOWARD you. 
_____________________
- Making everyone's day just a little more surreal -
Teeple Linden: "OK, where did the tentacled thing go while I was playing with my face?"
|
Dan Medici
Registered User
Join date: 25 Jan 2004
Posts: 132
|
11-04-2004 13:16
Ah, yeah, thats it.
|