Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

This question already has an answer here:

I have a 3D tile map made up of individual billboards in OpenGL ES. Each tile is a two-triangle mesh with a 3D vector to determine position and another defining rotation.

How can I rotate the entire tile map around an arbitrary point?

I'm guessing I need to set up a model matrix instead for each tile... then set up a projection matrix for the world. Then, on update, I would translate the world matrix and change the orientation and multiply it with each model matrix before rendering.

share|improve this question

marked as duplicate by Josh Petrie Dec 5 '13 at 1:55

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

1 Answer 1

I think I have figured it out.

The projection matrix is transformed and reoriented. This is then multiplied to all of the world objects model matrices. They are re-oriented accordingly (which works fine).

To follow a player the projection matrix and the player's model matrix are similar so you follow the player with the right offsets so the projection matrix is set just behind a player for say third person perspective.

share|improve this answer
There is a model-view matrix (takes model vertices from the local model space to world space), a world-view matrix (takes vertices from world space to view space, e.g. in relation to the camera) and then the view-project matrix (takes the vertices from camera space to NDC/projection space). Sounds like you are combining the world-view and view-projection matrices into a single world-projection matrix (common for optimization purposes, but hides the "real math"). –  Sean Middleditch Jun 7 '13 at 21:15
@Dev2rights The projection matrix doesn't really enter into this operation, generally. Your terminology is a little confusing as well, because one generally says that a matrix represents a transformation (or is used to enact a transformation) rather than the matrix itself being transformed (which is a wholly different operation). –  Josh Petrie Dec 5 '13 at 1:55

Not the answer you're looking for? Browse other questions tagged or ask your own question.