- Home /
Creating a 2D mimimap for a 3D car game
I am tring to create a minimap for my car game and while there are tonnes of tutorials for a top down camera map I want to actually show a 2d image and move that around based on the player location. Exactly like this screenshot. Bottom left. Can someone help me get a start on implementing this. I am really at a loss as the best way to do it. I am thinking a top down camera with an image over my level just like the other tutorials all say to do but I feel a giant image over my game will increase loading and size when it can just be a very small jpeg that moves in the same way. Anyway thanks for the help.
Answer by bennett_apps · Jul 22, 2018 at 01:52 AM
Check out Render Textures: https://docs.unity3d.com/Manual/class-RenderTexture.html Create an isometric camera, make a simple script that moves the camera to the player x and z axis, create a render texture that uses that isometric camera, create a raw image, put the render texture in the texture slot. Boom.
But that creates a top down map of my level and not a 2d image. I am looking for a basic line map without the added details of everything else like the above image. Is it still done the same way? Thanks
Hm...several options i can think of.
First, you put an image or something above the car, and use layers to make that image appear on the $$anonymous$$imap cam, but not the game cam. Also use layers to make all the objects in your scene disappear except for the road. So you just see the road & the image for a car.
Another way is to draw a small image representing your road and use ScreenToWorldPoint/WorldToScreenPoint to somehow map your little image to your big level...
Your answer
Follow this Question
Related Questions
Change Player MiniMap Icon 1 Answer
Minimap Camera 2 Answers
Can the Camera be Positioned on the Game Screen through code? 0 Answers
How do I attach a Camera to a GUI (for a Mini map) 4 Answers
Camera Shape Masks? 2 Answers