# Feel like a NOOB again (RTS camera driving me mad)

This topic is 4916 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

I just can't seem to get a camera I like for my RTS game. It's a 3D game with a heightmapped terrain, but the view is to be similar to the classic RTS games like Warcraft, C&C, Total Annhilation etc. So far I've tried a top-down perspective camera, but to get the visable area of the map small enough the camera was so close to the ground that units on tops of hills were 2X as big as ones at a lower height, and also it just looked funny because the camera was directly above the centre of the screen, not the bottom left corner! Then I tried an orthogonal view but that made it so you couldn't tell the terrain was 3D! I want something similar to an isometric view, but units in the bottom-left corner of the screen should be seen directly from above. And to stop the problmes of units on hills being too close to the camera, do I need a really low FOV angle - I'm using the classic PI/4 but maybe it should be more like PI/20 for this? I feel pretty dumb asking for help on this, but I just don't have hours to fiddle away with this being for 4E4, and having so much left to implement! Thankyou.

##### Share on other sites
I think a possible sollution would be to raise camera position (try kind of 30 real world meters) so even the closest unit will only be a bit bigger than the farthest. Why?

d_close = distance from camera to closest unit position
d_far = same for farthest unit position
unit_close_size - apparent unit size for close spot
unit_far_size - apparent unit size for far spot

d_close/d_far = unit_close_size/unit_far_size = proportion

The 'proportion' value should be a near 1 value (you said it is like 1/2 or less).

d_far = d_close + unit height difference

So, in order to have a good proportion between unit sizes the distance between camera and closest unit should be MUCH BIGGER than the difference between unit positions.

Good luck!

Having a smaller FOV will also help (I think you will need to adjust it), try 70.

##### Share on other sites
Yeah, I'd ahve to reduce the FOV. If I double the height of the camera, then the area of the map shown on screen will double too, and all the units will be half the size. To keep things the same size I'd have to halve the FOV.

Now what about getting the camera 'sitting' at the bottom-left of the screen, looking up and right in an isometric style? I've tried rotating it but everything goes wrong. Maybe it's the projection matrix I need to change to some offset perspective transform?

• ### What is your GameDev Story?

In 2019 we are celebrating 20 years of GameDev.net! Share your GameDev Story with us.

• 12
• 13
• 10
• 11
• 13
• ### Forum Statistics

• Total Topics
634096
• Total Posts
3015482
×