Hello i have a nav mesh that goes through a door like this:
But i hate the way it creates the path, it hugs the corners and looks so unnatural. Is there a way to make the nav mesh select more in the middle of the way rather than the edges so it looks more natural ?
If i make it any more thin, the characters struggles to fit through which looks even more strange.
1 Like
Can you artificially make the nav generated for doors more narrow so that the Agent is more centered when it goes through?
(only a good idea if you don’t have situations where multiple agents are attempting to use the doorway at the same time)
In my research I’ve tried several approaches.
-
make a list of all edges in the navmesh. Get nearest corner + corner normal and extrude out. This works fine except for narrow areas, but it’s still pretty dumb.
-
use navmesh raycast to find points for each corner to move out by. Then when a position is required, sample it as a spline. This is the best approach but requires you do all your movement manually and fetch a list of corners for the path yourself.
-
as above but exchange spline for steering, which naturally creates an arc, but you will need to do lots more checks so it isn’t abnormal looking.