|
Mafluence Kilian
Registered User
Join date: 11 Jul 2005
Posts: 1
|
08-26-2006 00:46
I have read about the various ways to move objects or avatars but, I am fuzzy on part of the proccess. If I have an object with a script on it, how do i know what i am calling functionality on the object or the owner? If I call llGetPos or llSetPos I know it is being called on the object the script is attached to. What if I want to move the avatar that is touching the object? How do I call functionality on the owner specifically?
Thanks, Mafluence.
|
|
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
|
08-26-2006 04:48
The only way to move an avatar that is not sitting on or wearing an object is with 'llPushObject()' (which works on the owner of the object even in no-push zones).
If the object is attached to the avatar, 'llGetPos()' and 'llGetRot()' will return the position of the avatar (at least from the root prim; check the Wiki for more details--I'm being too lazy at the moment). You move the avatar in that case as if you were moving a physical object ('llApplyImpulse()', 'llMoveToTarget()', etc.).
If the avatar is sitting on the object, you move the object however you would if the avatar weren't on it, and the avatar comes along for the ride (even with non-physical movment like 'llSetPos()').
Have fun!
|