Why does my enemy leave the NavMesh?

Hi! I’ve created a frog-like enemy in my game that hops toward the player. However, I want to make sure the frog uses a NavMesh, so it doesn’t do something stupid like jump off a cliff or repeatedly jump into a wall. Unfortunately, the frog has so far been perfectly happy to jump outside the bounds of the NavMesh. I set the default movement mode to “NavMesh walking”, but that didn’t fix it. Is there a clear reason the enemy doesn’t stay inside a NavMesh? Does it have something to do with the way I’m making it jump (LaunchCharacter node)? Alternatively, is there a way I can check whether a specific location is within a NavMesh? Any help is greatly appreciated!

I spoke to one of my colleagues, and he pointed out that there shouldn’t be a hole in the NavMesh around the enemy, as there is in the attached image. He suggested that perhaps this meant the enemy wasn’t actually in the NavMesh. Why is this happening? Is this normal?


Thank you for responding!

The frog is a Character.

I looked into it, and I did come across the Project Point to Navigation Node, but I don’t know how to use it. I can’t find documentation about it, and I don’t know how to obtain a Navigation Data object reference. Is there some documentation for that node that I can consult?

Okay, thank you for your help! I’ll try leaving the input nodes empty and see what happens.

how is your frog setup, is it a pawn or a character?

using the launch node probably isnt the best method, to my knowledge it doesnt take into account the nav mesh at all as its more of a physics base thing.

you may want to try getting a location vector say 200units forward from where the frog is then use the project point to navigation node to ensure that where your moving to is within the navigation then use a timeline to move the character. you could also try using the move to node for the movement and making the character jump at the same time (this wont give you as much control or be as accurate though).

i just did a quick search but all i found was on c++. i used it for a brief test before recommending it and its pretty straightforward basically you input a point and it tells you if theres navigation data where the point is. when i tested it i tried with inputting the nav data via a public variable and with leaving the nav data pin empty and both seemed to work. as for the query extent i havent really tried that out yet so i couldnt tell you. i was just using the node to ensure that the point your looking to move to is some where the character can navigate to.

It worked! Thank you so much for pointing me in the right direction!