View previous topic :: View next topic |
Author |
Message |
ChristianK
Joined: 26 Sep 2006 Posts: 159 Location: Berlin, Germany
|
Posted: Tue Oct 10, 2006 4:35 pm Post subject: |
|
|
Quote: | 'm not sure if I understand the problem. Is this done to get the coordinates of your 'world' that match the screen mouse position, to, for example, see if the mouse is over some sprite? |
I thought that what what clay was doing at the moment, so yes.
Quote: | If this is the case, gluUnproject can be of help: |
Thanks! That's indeed simpler than doing it manually - didn't know it existed.
Quote: |
What do you mean with transforming the camera? |
Moving, scaling and rotating the camera, as opposed to doing it to the world.
Quote: | What is the origin, (0,0) or (halfWindowWidth, halfWindowHeight) ? |
(0,0) |
|
Back to top |
|
|
Lutger
Joined: 25 May 2006 Posts: 91
|
Posted: Tue Oct 10, 2006 7:48 pm Post subject: |
|
|
Sequoh wrote: | Quote: | What do you mean with transforming the camera? |
Moving, scaling and rotating the camera, as opposed to doing it to the world. |
Ah okay. In opengl they are sort of combined. There is the projection matrix, which is basically you 'lens' and this can be used for zooming. Then there is the modelview matrix, which determines both the world (model) and how you look at it (view). If you think about it, moving a camera and moving a scene amount to the same thing, it's just that in the real world you cannot move a forest if it's in the way
You can translate and rotate all you want at any time, so no problems there. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|