Rotating an avatar via an attachment to point to an object

Ethan Okelly ethan.okelly at gmail.com
Thu Jan 24 15:20:38 PST 2008


Hi All,

I was wondering if I could consult the brains trust on a problem  
that's been perplexing me for well over a week.  I'm sure its  
something simple that I'm missing.

Here is the scenario:

1.  I have at scripted object attached to an avatar such as a  
necklace with the script residing in the root prim. (done)

2.  I have another object, not attached to the avatar.  For the sake  
of discussion lets say its a ball elsewhere in the same room. (done)

3.  When I move the ball the necklace senses that it has moved and  
notes its vector position (done)

4.  I need the necklace to rotate the avatar (on the horizontal axis  
only) to directly face the ball in its new position without changing  
the positioning of the necklace on the avatar. (this is the part  
where I come unstuck)

I have spent days googling and studying the wiki, LSL library, and  
script packs and I just can't seem to make it happen.

Any samples or assistance on how I might achieve this would be  
greatly appreciated and save me from further baldness.

Kind Regards

Ethan Okelly


More information about the secondlifescripters mailing list