I'm currently having some positioning problems using OpenGL and LWJGL, but figured this would be generic enough for the OGL forum!
I wanted to know whether my method for positioning objects in the world is correct, as I'm not sure my matrix operations are in the right order.
For every object that's placed in the world, I'm doing the following:
- Load the Identity Matrix (reset everything)
- Translate to the camera's X, Y, Z position
- Rotate the camera around the X and Y axes (I'm not doing Z rolling)
- Translate to the object's X, Y, Z position
- Rotate the object around the X, Y, Z axes.
I keep tweaking things and somehow getting it to work, but I'd like to know the de-facto method for accomplishing this. I'm aware that you're normally supposed to rotate before a translation, but I think it works different in LWJGL? I might be wrong on this, though.
Every object has its own X, Y, Z position in the world, as has the camera. But the whole interation between them has confused me to no end now!
Thanks for any assistance anyone can offer : )
Edited by PixelPrime11, 09 November 2012 - 11:12 AM.






