Modifying navigation meshes

mattvonfatmattvonfat Posts: 2Member


I'm just getting started with 3D development and I wanted to make a game where you can control they player by clicking where you want them to walk, which seems reasonably straightforward with the Navigation node. I also want to let the player place objects in a room though, so I need to be able to update the navigation mesh when they put an object down and this seems to be a bit more complicated!

So far I've managed to get something working with the CSG meshes, where I subtract cubes from a CSG version of the navigation mesh and then turn the result in to a navigation mesh, which seems to work ok, but I was wondering if there was a better, or official, way of doing it because the method I'm using at the moment seems a bit clunky and messy?

I've tried searching online and it seems that it might not be possible, but the posts I've seen about it seem to be a few years old so I'm not sure if there's been updates since then and I'm missing something obvious?




  • GlyphTheWolfGlyphTheWolf Posts: 100Member


    As I know there is no better way. Only way is to generate navigation mesh yourself if you want to exclude some objects etc. or just write other code that let you avoid collisions (with dynamic objects for example) without modify navigation mesh. Of course unless I am mistaken, but I was also looking for that and found nothing more than custom navigation mesh generation.

    Idea with usage of CSG meshes is even not so bad when I think about that.

    Well anyway if someone knows better way I also would like to know :3

  • CalinouCalinou Posts: 607Admin Godot Developer
    edited April 14

    Outside of AStar, navigation dynamic avoidance will only be supported in 4.0, so in the meantime, you'll have to find a workaround.

  • mattvonfatmattvonfat Posts: 2Member

    Thanks for your responses! The update to navigation in 4.0 looks like exactly what I need so I guess I'll wait for that.

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file