Jump to content

Move a floating box around my head, keep it in front of me


Torivas Goldshark
 Share

You are about to reply to a thread that has been inactive for 4560 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

I have this box, with a media texture, and I want it to stay in front of my face.

I have it attached to my skull, but that causes a few annoyances, like it being angled along the Y axis when I zoom in on it. As I understand there is no way to dynamically rotate an attached object relative to the world.

So I think a better way to do this would be to rez it and have it float generally in front of my avatar at head height, and have a certain face of the object always facing me. So only the Z- axis would have to rotate, I think.

I have absolutely no clue how to do this. Would anyone mind helping?

-Torivas

Link to comment
Share on other sites

Use llGetObjectDetails( key id, list params ); to find out where your avatar is and how it is rotated.
Then add the vector, avatar to object and rotate it same amount your avatar is rotated.
Now you know the position of your prim.
Finally make your prim face your avatar using llLookAt or llRotLookAt

Note: You may want to add an offset in order to lift the prim from the avatar center to the head level

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 4560 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...