Possible to restrict a Character to NavMesh?

Hey guys.

I have automated AI Pawns that correctly use a NavMesh to seek and hunt the player. Cool!

But the character (pretty much the default ThirdPersonCharacter blueprint) is player-controlled, and I also want him to stay on the NavMesh. Currently, the character seems to move around the world exclusively via Add Movement Input and collision with world geometry. How can I lock the character to the NavMesh and not allow him to walk off?

I tried turning off “walk off ledges”, but this seems to only apply to height related cases. I want to straight up block him from moving off, ever. Is this possible? Or do I have to roll my own solution and give up a lot of the nice functionality in Character Movement?

You could do it a couple ways. It revolves around checking if the point is valid.

If you are doing click to move, check the point first if it is valid.

If you are adding movement input, check a point in front of the character a short distance, and see if that is valid before allowing the movement input, otherwise stop the movement.

Is Valid Node

Can you go more in depth with your answer? I’m not sure how to get the “Is Valid Node” to work. Can you screenshot an example of how to implement the node?