Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Question about rotation and position

Junie Ginsburg
Steampunk Merchant
Join date: 5 Aug 2006
Posts: 35
11-22-2006 07:51
Say I have a prim and I've described a point in space somewhere around it. The point in space is defined by a vector.

Now say I rotate the prim on any axis, or all three. How can I solve for the point in space mentioned above, *relative to my prim*, at its new rotation?

Thanks for any advice on this question!
Jesse Barnett
500,000 scoville units
Join date: 21 May 2006
Posts: 4,160
11-22-2006 08:14
No solving necessary on this one. Just use either llLookAt or llRotLookAt.
_____________________
I (who is a she not a he) reserve the right to exercise selective comprehension of the OP's question at anytime.
From: someone
I am still around, just no longer here. See you across the aisle. Hope LL burns in hell for archiving this forum
Eloise Pasteur
Curious Individual
Join date: 14 Jul 2004
Posts: 1,952
11-22-2006 08:23
Hmm, I don't think Jesse's got the right end of the stick, at least not for how I read the question.

if you've got a vector v that is the offset from the current position at zero rotation, then the same offset at the new rotation is v*llGetRot();

If the vector is absolute (vAbs) then v=vAbs-llGetPos()

If the initial rotation is other than zero then v/=llGetRot() will correct for that.
_____________________
Eloise's MiniMall
Visit Eloise's Minimall
New, smaller footprint, same great materials.

Check out the new blog
Junie Ginsburg
Steampunk Merchant
Join date: 5 Aug 2006
Posts: 35
11-22-2006 08:41
Thanks, Eloise, your suggestions sound promising. I'll give those a shot tonight and see how it works out.