How to create a mini map? Please give me a clue
Hello.
My in-game city is huge (As big as Miami) So I need a mini-map and radar system just like the one in GTA IV or GTA V but I don't know where to start making them, Are there any asset that does so? Would be very happy if someone helps.
My in-game city is huge (As big as Miami) So I need a mini-map and radar system just like the one in GTA IV or GTA V but I don't know where to start making them, Are there any asset that does so? Would be very happy if someone helps.
Replies
-
Start with a Google search.
"mini map unity"
Every single time, before I start a thread to ask how to do something, or how to solve a problem, I do some web searches first.
http://polycount.com/discussion/63361/information-about-polycount-new-member-introductions/p1#asking
-
-
Eric Chadwick said:Start with a Google search.
"mini map unity"
Every single time, before I start a thread to ask how to do something, or how to solve a problem, I do some web searches first.
http://polycount.com/discussion/63361/information-about-polycount-new-member-introductions/p1#askinglaforced said:
1 - Uses SVG or something like the one that GTA IV or GTA V uses And is able to be streamed in RAM (since the whole map is too big to be stored in RAM at once)
2 - Something to make a GPS system with.
I hope I clarified the problem.
-
First I was thinking about a scene capture/render target thing but for a world map, this would be very bad..
The world map could be a print screen or rendered image of the world from an orthographic camera.
Then this could be your background texture on the map, and the markers/moving characters etc could be separated UI elements that are just positioned and drawn on top of the background. -
This is in Unreal, but I'm sure you can create something similar in Unity as well.
So I made this thing to capture world map texture in the editor. In this example, the world is a landscape and we assume, the bounds of the landscape is the end of the level... I have a scene capture 2d, and a render target. The projection is set to ortographic, and the width is set to match the landscape dimension. Its also centered to landscape. Then I just draw it to a render target, and save it as a static texture.
This can be the background texture of your map/minimap. -
I asked you to do a search because you didn't indicate you had done it already. The information in your 2nd post is the kind of info that belongs in the 1st post.
To do a GPS system, you will need pathfinding in your minimap. -
This is how I would do the icons/markers:
- The minimap UI would have a container for the icons
- A script, that can be added to anything, and it spawns an icon ui that attaches to the minimap, and sets its coordinates, based on the world coordinates of this object:
Then, if it needs to move, we can have an update position function. I wouldn't update it on every frame...
Result - script attached to some cubes:https://www.youtube.com/watch?v=UTMGP7evhlY&feature=youtu.be
For the GTA style one, you will need to set the minimap size bigger than the rendered minimap area, and offset it based on where the player is.
Also, I would not recommend to use a dynamic scene capture and render target, because this works too and should be much cheaper. -
Creating a GTA V like mini-map in Unity https://youtu.be/ktTegOCaffw