Moving NavmeshCut mesh by center doesn't update

Hi,
I tried moving the NavmeshCut components mesh at runtime by moving its center and the graph did not update. I appreciate that moving the GameObject that has the NavmeshCut component updates fine so i can workaround with that, but wondered if this was intended or a bug?

Hi

Yeah, currently the navmesh cut will automatically recalculate if the center is changed from the unity inspector. However for performance reasons it does not check all the different variables that could have changed every single frame (with lots of objects that can add up to quite a significant overhead). I should rewrite this so that it uses properties instead so that the setters automatically do this, but for now you can call the cut.ForceUpdate() method right after you have changed the center and then it will update as it should.

If it does not update when you change the center from the unity inspector, then you are likely using an older version.

Thanks, i thought i had tried the ForceUpdate, but I will test again tomorrow in case i got the syntax wrong.

1 Like