Skip to main content
gamedev.net
🔒 Locked

Camera Positioning

Started by nitinjavakid Jun 2, 2006 at 12:58 PM 2 replies 600+ views
Original Post
nitinjavakid
nitinjavakid
I was searching the Quake 3 source code to find where it positions the camera during the gameplay with respect to the player model.As usual was unable to find it.Can you plz specify the exact co-ordinates?
Zakwayda
Zakwayda
Quote:
Original post by nitinjavakid
I was searching the Quake 3 source code to find where it positions the camera during the gameplay with respect to the player model.As usual was unable to find it.Can you plz specify the exact co-ordinates?
I've spent a fair amount of time looking through the Q3 code; I'm not sure exactly where to tell you to look, but here are a couple of suggestions. If you have access to an IDE or editing environment that will allow you to search for variables or functions textually or by definition, it can make it a lot easier to dig through the code. Specifically, I think in the renderer back end the current player/view and model matrices are always available globally. If you can find these, and then use whatever search capabilities you have available to trace them through the program, I'm guessing you could find the code you're looking for.

Also, the local model considers +z to be up and either x or y to be forward; before submission to OpenGL, a swap matrix is applied to match OpenGL viewspace convention.
Bob Janova
Bob Janova
In Quake II I think the camera is 100 units up the player model, i.e. in player-local space the camera is at (0,0,100) and looks along (1,0,0).

Topic Locked

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

Sign in to reply to this topic.