Re: matrix rotation.
- Posted by WeedenSoft Technologies <theskaman at MINDSPRING.COM> Jan 05, 1997
- 1128 views
I quote this from the Black Art of 3D Game Programming by Andrew LaMothe (great book, highly recomended)...to adjust angle along z axis (up/down) new_direction[x] = direction[x]*cos(angle) - direction[y]*sin(angle) new_direction[y] = direction[x]*sin(angle) + direction[y]*cos(angle) to adjust along the x axis (forward/backward) new_direction[y] = direction[y]*cos(angle) - direction[z]*sin(angle) new_direction[z] = direction[y]*sin(angle) + direction[z]*cos(angle) Hope this helps, Adam Weeden WeedenSoft Technologies