0

I've been plucking away at a capital ship real-time strategy game, and I'm getting ready to start implementing a ground to space invasion system -- but I can't seem to wrap my head around how ground unit pathfinding would work if a Quadtree LOD system is being used.

Most ground-to-space games I've played seem to generate mesh colliders on the fly as you get closer to the ground, and the quadtree subdivides; with that comes all the NPCs that pop into existence for the first time and use said colliders, but I'd like my units to have a persistent presence as the player zooms in and out from the planet -- but I feel that having dynamic terrain and mesh colliders would mess up unit pathfinding, or they may glitch in and out of the terrain for example.

Does anyone know if this issue has been tackled in a game before? My gut tells me that you'd need a persistent mesh collider, which would mean the planet couldn't have much variation (to keep the collider poly count down).

Thanks for your time!

  • I realized upon writing this that my units could generate their own mesh colliders based on the planetary height-map data. It would just be a matter of multi-threading that procedure, and doing it for groups instead of a single unit. – 3D Wave Design Jul 06 '20 at 13:01
  • I consider you need to program collisio. link https://docs.unity3d.com/ScriptReference/Collision.html – Alejandro Gonzalez Jul 06 '20 at 14:03
  • Thanks for your response. I'm aware of collision scripts for Unity and Godot, but I'm looking for best practice when it comes to extremely large, dynamic environments. I could change how RTS units respond to collider meshes -- maybe they appear a meter or two above a collider mesh that has a LOD, so they don't clip through it when it changes based on their player's distance. – 3D Wave Design Jul 06 '20 at 15:13
  • Probably don't use mesh collision for pathfinding? You should have a grid or something alike to pathfind through. You can use the mesh to generate the grid once and update it when something changes. – Peri Jul 08 '20 at 07:00

0 Answers0