Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Avatar rotation on rotating child prim

Basement Desade
Registered User
Join date: 14 Jul 2006
Posts: 91
01-26-2009 17:36
I'm pretty sure this is possible, but I have no idea where else to look. What I want to do is to make an avatar rotate when it is on a poseball that is a child prim.

Obviously, getting an avatar to rotate when the poseball is the parent (or only) prim is easy; spin the poseball with a rotation script, and the avatar rotates with it. Link the poseball to a parent prim, however, and it still spins, but the avatar does not. At least, that is, with any of the rotation scripts I have in my toolbox. :)

This seems to me to likely be one of those things that would be simple for someone who already knows the answer. I've looked both here and in the wiki and so far have come up empty. Can anyone tell me how to "engage the clutch" between a rotating child prim and an avatar?
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
01-26-2009 19:47
First off, you have to understand that an avatar DOESN'T sit on a child prim. An avatar sits on the OBJECT. Sit targets and physial "room" on a prim are just ways for the sim to know if there is logically enough "space" left for an avatar to sit on the object, and to give scripts a convenient utility for LOGICALLY tying a sitting avatar to a prim in the link set. However, sitting avatars really aren't treated differently from child prims. You can move an avatar away from a sit target and llAvatarOnSitTarget() will suddenly return NULL_KEY. I believe you can move an avatar (sitting on the object) to where its bounding box intersects the sit target (or put its origin close enough to the sit target maybe) and llAvatarOnSitTarget() will start returning that avatar's key.

That being said, there's no way to get an avatar to automatically rotate with a child prim, but you could use llSetLinkPrimitiveParams() to periodically update the avatar's rotation, so you can do it in a sense though it won't be a smooth synchronization.