Sign in to follow this  
ForestMaster

Right perspective view for a RTS

Recommended Posts

Hi all! Im trying to satisfy my willing of writing a little RTS in my free time. Ive thought about a lot of things, but I can't get how to set camera, rotation... to have the right view. I want to obtain the trapezium, so that perspective can be seen but not the inclintaion of the plane, i hope u get what i mean :) Any answer will be thanked :P

Share this post


Link to post
Share on other sites
I will try to better explain, i'd like to know Where to position the camera, Where to set teh viewVector of the camera to get an "age of mythology" type of view rotating everything back a bit before drawing to 'watch' a trapezium.
I know I can't well explain, I'm noob :)

Share this post


Link to post
Share on other sites
Obviously, isometric view (30 degrees between x and z, -30 degrees between this plane and the y axis) is a good start.
You will then put the camera at a given height above the battefield.

Share this post


Link to post
Share on other sites
Quote:
Original post by lucem
Obviously, isometric view (30 degrees between x and z, -30 degrees between this plane and the y axis) is a good start.
You will then put the camera at a given height above the battefield.


So(OpenGL)
------------------------------------>
//before drawing anything
glRotatef(30, 1, 0, 1);
glRotatef(-30, 0, 1, 0);
glLookAt(0,3.5f,6,
0,1.5f,0,
0,1,0); //handled with my own camera class
/* Draw the hell you want */
<-------------------------------------

I dont' well know how to use angles and camera positioning, directioning, but.. Am I on the right track?

[Edited by - ForestMaster on March 17, 2006 2:43:12 PM]

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this