- Home /
Minimap camera display size.
I have a problem with a minimap im creating, i have a secondary camera that displays objects for my minimap, but have it only display a "miniMap" layer. I want to be able to show icons for different objects to be represented on the minimap. Right now i want my minimap to cover the whole level, but the camera can only represent a part of it. I tried changing the FOV and clipping planes, but my camera seems to display things very far away, and i cannot get it to view all of my level. My level is 300000 units in size on x and y , and my camera seems to only be able to view in a rectangle. How can i stretch this, and display my entire level (without distortion of icons in level) and also make objects not seem too far away. My icons are above each object i want todisplay, and the objects only show in the main camera, and icons in minimap by culling.
Hopefully this is enough info, if not i can post pictures of my scene.
Anybody have any ideas on this?
Answer by BigBlob · Feb 05, 2012 at 01:02 AM
You can only make a Square and Circle MiniMap. The easiest map to make is a Square.
So lets get started.
Make a new camera in the scene and call it "MiniMap"
Take a look at the "Normalized View Port Rect"
Set the W and the H to 0.2 or 0.1, your choice.
And then set the Y to 0.8.
Then put a script to the camera called "SmoothFollow"
And then set the Target to your Player
Then change the distance from 1 to 20
And the Distance from 30 to 50, the rest is all 7
Then its your choice to set it Perspective(3D) or Orthographic(2D)
This would be great, except my game is an rts. I don't want my $$anonymous$$imal camera to follow the selected unit, but to show the whole battlefield. Yes I know the dimensions of my battlefield.
Is it much more efficient to use the normalization view port to display the camera output, over using a camera rendered guitexture? I use manipulations on a guitexture right now. Does viewport rest use normalization coordinates for screen placement (I'm assu$$anonymous$$g yes), which then it would be a huge pain to work with when animating, and my camera is designed to be square. If need be I can just mask off areas I don't need.
I already searched and found the rpg style follow $$anonymous$$imap topics, but wanted help for an rts. Sorry I wasn't very clear.
Easy enough... Just eli$$anonymous$$ate step 5 & 6, and adjust the camera as needed.
I would also suggest that you change the $$anonymous$$imap camera from a Perspective Camera to an Orthographic.
No problem to make the $$anonymous$$imap square, but if you are allowing multiple resolutions, you might have to do some scriptery to make that conform.
Your answer
![](https://koobas.hobune.stream/wayback/20220613063739im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Is it possible to make a camera update only once every X seconds ? 2 Answers
RTS minimap (mobile but still taking all ideas) 1 Answer
Native camera FOV? 0 Answers
Translating main camera co-ords to minimap? 0 Answers
Minimap enemy icon help? 0 Answers