How do i rotate around an arbitrary axis.
Hey, i am a bit confused about this whole rotation thing of game programming. How do i rotate a system around an arbitrary axis. I am trying to control my system like a standard fps camera is controled. I think the only way to do this is to rotate around the "up" vector of your camera when turning side to side, and around the "side" vector when i want to look up and down.
My question is how do i go about rotating a xyz component vector around another xyz component vector. I have heard quaternions might be my answer but i dont understand these very well. I will go research anything i just need to be shown the right direction.
Forget quaternions -- they are an optimization. The graphics API you are using probably has a function that rotates around an arbitrary axis. In OpenGL, you use glRotate. In D3D, you use D3DXMatrixRotationAxis (or perhaps D3DXMatrixRotationX, D3DXMatrixRotationY, or D3DXMatrixRotationZ) to generate a rotation matrix.
But you say you are confused about rotation in general. Maybe you should learn a little about how linear algebra works. Take a look at the GameDev Books page to find some recommended math books.
But you say you are confused about rotation in general. Maybe you should learn a little about how linear algebra works. Take a look at the GameDev Books page to find some recommended math books.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement