Skip to main content
gamedev.net
🔒 Locked

camera movement

Started by hello_there 6 replies 200+ views
Original Post
hello_there
hello_there
what''s the command to move the camera? please don''t tell me to go to nhe site
____________How could hell be worse?
rgirard413
rgirard413
Theres not a command to move the camera really, you need to translate and rotate the world matrices. If you went to nehe and actually read the tutorials, they would provide you with very helpful information
http://www.thedizzle.com
Zeus_
Zeus_
... You cannot be serious...
hlusnagen
hlusnagen
i thing the dummass game engine has some usefull comands for you ''situation''

ANSI2000
ANSI2000
It is called gluLookAt...

And I dont care how slow ppl say it is it is one call per loop!
rgirard413
rgirard413
If you dont want to use gluLookat, you can use glTranslate and glRotate, but make sure that your world matrix is the currently one selects. ie glMatrixMode(). gluLookAt will work, but if you looked at the code behind it, you will see that its essentially all matrix stuff.
http://www.thedizzle.com
hooded_paladin
hooded_paladin
Okay, if you really don''t want to read the tutorial (#10) then I''ll summarize: To move or rotate your camera, you translate or rotate in the opposite direction before you start drawing the polygons. For example, if you wanted to move -5 in the Z coordinate and turn right 90 degrees, you would translate 5, and rotate 90 degrees left. Or maybe rotate first... For a better explanation, JUST READ THE TUTORIAL!
______Pretty guy for a white fly.
rgirard413
rgirard413
You need to rotate before you move, otherwise you will get some funky translations, and make sure that your rotating the projection matrix if you want to be doing a camera
http://www.thedizzle.com

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.