Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Before I drag out all of my trig ....

Alidar Moxie
Registered User
Join date: 2 Dec 2005
Posts: 47
04-18-2007 11:18
Imagine that you have a chessboard that rezzes peices onto its surface (not linked), you can use the normal REZ and assuming the board is perfectly aligned with the axes you can figure out where to rez them pretty easily.

Now, tilt the board in any of the three directions. If I wanted to rez the peices after the rotate I would need to bust out a lot of sin, cos, etc.

Am I missing something that makes this easier?
Seifert Surface
Mathematician
Join date: 14 Jun 2005
Posts: 912
04-18-2007 11:24
Yes. Rotations. If you do v * r where v is a vector and r is a rotation then v gets rotated by r. So if you know the offset of your chesspiece from the center of the board when the board is at ZERO_ROTATION (v), and you know the rotation of your board (r), v * r should give you the correct offset in rotated position.
_____________________
-Seifert Surface
2G!tGLf 2nLt9cG
Dnali Anabuki
Still Crazy
Join date: 17 Oct 2006
Posts: 1,633
04-18-2007 11:59
I don't know if this is what you are asking but if it was me I would rez the board and pieces then select link all the chess pieces. Then rotate the table and then rotate all the linked pieces and then unlink them. Have to be careful that the pieces aren't unlinked in themselves. Be sure to choose them as a whole and just unlink from the set.
Alidar Moxie
Registered User
Join date: 2 Dec 2005
Posts: 47
04-19-2007 05:15
Dnali,

The project isnt a chess board exactly, it was just the easiest way to explain what I am trying to do without getting bogged down in other details. Besides, I need to be able to 'move' the peices (maybe by de-rezzing and re-rezzing them).

Seifert,

Thanks for your help. As soon as I get a chance to get more done on this I will try it out. I see the logic (I think) but rotations always seems to knock me on my .... butt.

-Ali