Limit player movement to navmesh

Hello everyone,

I’m quite new to navmeshes and I’m currently trying to figure out if there is a way to limit my players movement to the navmesh when he is controlled by gamepad or keyboard… and is not controlled by an agent?

Best,
Verdemis

Ok I’m just very very stupid… I don’t know why I didn’t tried that, but adding an NavAgent to the player was the solution.

Don’t feel stupid…I’m trying to do the EXACT SAME THING and anything “Agent” I read about always seems to be about controlling an NPC, AI, etc. Keerypes, I’ve been searching for 3 days now…

1 Like

Well, as he says he added a NavMeshAgent to the player character and handled movement through that.

1 Like

I have the same problem and I have setup the navmesh as well as have nav mesh agent yet the player still falls from the edge any help would be appreciated

1 Like