hi, guys. I wanna to create a mini-map at runtime, and i have some points that represent the road, and when the character moves, it is reflected to the mini map, how can i realize it? using the GL class or Gizmal? Is there some good idea?
next time please search the site for answers before asking the exact same thing. I spent about 30 seconds searching
Thank you very much. in fact, i have searched it on this website, i just searched the tag "mini-map" and got no satisfying result. However, i know how to realize the radar, but it's not exactly what i want,the question that i am concerned about is that how can i draw the road in a specific area dynamicly.
sorry I didn't understand your question and I still don't fully, are you trying to create a radar type thing with a map OR are you building a road at runtime in a specified area. Sorry been ill the last couple of days probably me just being a bit slow
Maybe it's my fault! my question seems not to be clear.And here, i will state my view again with a example: There is a character in my Terrain, and the terrain is very large, also, the terrain is generated at runtime. And i have some points measured by the Measuring Department that respect the road, what is important is that, the road points are not fixed.So, i must draw it at runtime,so is in the radar.
In brief, i wanna to draw a radar which can draw the road dynamicly.For example, when the character moves into limited range, draw the road on the radar, if the character moves out, the road disapper too.
I did it this way and it works out pretty well. From Daniel’s answer above, follow the last link to attaching a second camera for a gui minimap. This method works fine except that both cameras render the same thing wasting performance. So to avoid rendering twice, you could do this:
Create a separate layer called something like ‘minimap’
Set the second camera’s culling mask(in inspector) to render only this layer. Similarly uncheck rendering of minimap layer in main camera’s culling mask.
Ask your artist to give you a picture of the top view of the environment. This need’s to be approximately 1/4th the size of the target resolution.
In Unity place a plane in the middle of your environment and scale it evenly till it fits the entire location.
Apply the picture from the artist onto this plane and change the material if needed.
Scale it and move it till it matches the actual environment. Change the plane’s layer to ‘minimap’
So the main camera renders everything except minimap layer, and second camera renders only minimap layer.
For showing elements on the minimap:
Attach planes to each character/object you want to show on the minimap, facing upwards.
Change the texture to an arrow/circle(or whatever you want it to look like on the minimap)
For each plane change the layer to ‘minimap’ and Voila! a proper minimap
Thank you very much. in fact, i have searched it on this website, i just searched the tag "mini-map" and got no satisfying result. However, i know how to realize the radar, but it's not exactly what i want,the question that i am concerned about is that how can i draw the road in a specific area dynamicly.
– Yanger_xysorry I didn't understand your question and I still don't fully, are you trying to create a radar type thing with a map OR are you building a road at runtime in a specified area. Sorry been ill the last couple of days probably me just being a bit slow
– ScribeMaybe it's my fault! my question seems not to be clear.And here, i will state my view again with a example: There is a character in my Terrain, and the terrain is very large, also, the terrain is generated at runtime. And i have some points measured by the Measuring Department that respect the road, what is important is that, the road points are not fixed.So, i must draw it at runtime,so is in the radar.
– Yanger_xyIn brief, i wanna to draw a radar which can draw the road dynamicly.For example, when the character moves into limited range, draw the road on the radar, if the character moves out, the road disapper too.
– Yanger_xySo the road is hidden by the "fog of war" on the minimap, right?
– SuIXo3