A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mina-pecheux.medium.com/making-a-rts-game-40-fixing-our-minimap-unity-c-dd3f46c8cfb4 below:

Making a RTS game #40: Fixing our minimap (Unity/C#) | by Mina Pêcheux | .Net Programming

Making a RTS game #40: Fixing our minimap (Unity/C#)

Today, we’ll continue working on our RTS and fix our minimap!

⬅️ Tutorial #39: Boosting our game scene | TOC | Tutorial #41: Preparing for a main menu… ➡️

📕 Get the ebook and bonus material on Gumroad!
🚀 Find the code of this tutorial series on my Github!

A while ago, we worked on our minimap and we even implemented some logic to move around a little indicator that shows our current main camera view zone.

Although it was a nice opportunity to discuss raycasting and dynamic mesh instantiating/updating, the thing is that this technique is pretty fragile and not the most efficient. If you start to have more “rocky” terrains or, just a hill somewhere, the difference between the flat FOV plane and the terrain itself will completely mess up the computation.

To fix this, today, we are going to completely refactor our minimap management system and instead rely on GL rendering to show the indicator on the UI minimap image. Then, we’ll see how to properly clamp the camera to the map and how to handle the “click and drag” camera re-positioning feature.

Switching to GL rendering

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4