I already know that there isn’t real a camera in opengl, but you can move the world. Now i want to know the source code to do these things:
On keypress[n] move v units in direction made up of the angle around the x- y- and zaxes.
translatef(…)
rotatef(…)
Can someone please send me the source code for this? I don’t need initialization for lighting such stuff. Thanks - Post the sourcecode would be the best, but you can also send it to lightsabresoftware@yahoo.com (simple copy/paste)
Thanks in advance - Ls
Maybe you want to do your own rotations/translations. You can the position the the camera where you want using gluLookAt();. Now is not the world translated but your camera.
DPalomo: That didn’t work. I cant say why, cause I did all how you said. Now, does anyone have working code? I already have my own class, but i will use anyone other’s class that works. The best would be, if it’s not using glut or glu, i’m only using opengl with mingw32, and sometime use allegro( www.allegro.cc or www.talula.demon.co.uk )
Thanks in advance.
Ls
Ahhhh…, ok…
just do glTranslatef(slide, 0.0f, 0.0f);
and in your message loop put something like i showed you above. Just be sure to set everything to zero after each loop unless you want to speed around forever.
SLIDE??? Are you crazy? Thats as easy as … uhm… very very easy! It isn’t real sliding, cause it’s not affected by the zangle - and thats what i need!!!