Search code examples
c#imageunity-game-engine

showing user position in game side map


I am making a game and player has to reach at specific destination.

I want to show side game map to guide him the way that where is he now and where he has to go. Just like GTA and other game where a side map always appear in any screen corner which guide player. I don't have any idea how can I do this I checked it on google but maybe I'm missing the appropriate words for searching.

currently I made a photo of my scene and just showing it on right bottom corner of my game screen. how can I place current user position and destination position and change it accordingly as player move??

public Texture mapTexture;
void OnGUI() {
   GUI.DrawTexture(new Rect(Screen.width - 200, Screen.height-200, 200, 200),mapTexture);
}

Solution

  • Thanks to google and @Serlite. using this youtube video and unity3d Web. I made side camera (minimap camera) parent to my player and set the Normalized View Port Rect property setting and Al-hamdu-lillah its working:)!! "" camera setting