Just so you can see what I’ve tried already, I’ve created the rotation matrix and saved it to the right, up and forward vectors. ![]() ![]() So what I’m doing now is trying to create the matrix for translation and rotation and saving the results to the vectors explained above, then I have an appl圜ameraTransform method that puts the vectors into a FloatBuffer (as I’m working with java) and then multiplies it by the modelview matrix.Īnyway, any help would be much appreciated. The reason I’m trying to create these matrices is because I want the scene to rotate around the camera’s position and not the origin. I’ve been struggling to work this out for a few days now. If anyone could give me a brief walking through or any examples to illustrate your point I would really be grateful. I’m not really sure I’d create the rotation matrix and what makes it up. I’ve created a camera class with 4 vectors (right, up, forward and origin) and a moveForward method (in java’s OpenGL binding LWJGL) which moves the character forward with a simple origin + forward vector addition, but now I’m on a rotation around the Y axis to simulate turning left/right. ![]() ![]() I’m trying to make a rotation matrix for my camera view at the moment and I’m not entirely sure how to do it.
0 Comments
Leave a Reply. |