C Board  

Go Back   C Board > General Programming Boards > Game Programming

Reply
 
LinkBack Thread Tools Display Modes
Old 02-02-2003, 05:09 PM   #1
Banned
 
Join Date: Jan 2003
Posts: 1,708
Question about view vector, position, and matrix speed

I'm trying to make my own camera class, and I'm trying to get an idea of how gametutorials made theirs. when i was looking through theirs i found that whenever you strafe you not only add the strafe vector multiplied by speed to the position, you also add this to the current view vector of the camera. When you move forward or backwards you must first subtract the position vector (i know it isn't really a vector, but it seems standard to use a vector as a point class too) from the view vector and then do the same. Why is it done that way? I thought the position vector and view vectors could be maniuplated completely independant for each other. I thought the glu lookat function took care of all of that behind the scenes for you. Well anyway I don't know why it's done that way and I don't want to write anything that i don't understand.
EDIT: in the strafe movement it's only the x and z compontents which are modified, in the forward/backward movement all components are modified.

About the matrices: when they do the rotations with the mouse, I noticed they don't use opengl matrices. Would it be faster to do so? There's quite a bit of multiplication involved, and it takes every scene.
Silvercord is offline   Reply With Quote
Old 02-03-2003, 12:37 PM   #2
Registered User
 
Join Date: Feb 2002
Posts: 93
Here

http://www.makegames.com/3drotation/

helped me out.. i also went through the camera tutorials @ gametutorials and couldn't figure out what they were doing... i found this tutorial and read through it and it answered all my questions on matrices & rotation/moving in 3D space... perhaps it may be of some use to you...

Last edited by tegwin; 02-03-2003 at 12:43 PM.
tegwin is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
C - access violation uber C Programming 2 07-08-2009 01:30 PM
Matrix Help HelpmeMark C++ Programming 27 03-06-2008 05:57 PM
matrix class shuo C++ Programming 2 07-13-2007 01:03 AM
What is a matrix's purpose in OpenGL jimboob Game Programming 5 11-14-2004 12:19 AM


All times are GMT -6. The time now is 08:25 PM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22