playMaker

Author Topic: how to mousepick to the actual navmesh?  (Read 1007 times)

Twood

  • Junior Playmaker
  • **
  • Posts: 80
how to mousepick to the actual navmesh?
« on: May 25, 2021, 06:19:21 PM »
I don't really see actions to do this.

A kind of weak workaround is to make floors another layer name ... but then you lose the obstacle data of the navmesh and can click inside those obstacles so it's not really what I'd prefer to do. It would need too much cleanup.

I'd rather figure how to only get a useful click ONLY inside the navmesh to move the character, anyone try that?
« Last Edit: May 25, 2021, 08:00:59 PM by Twood »

Twood

  • Junior Playmaker
  • **
  • Posts: 80
Re: how to mousepick to the actual navmesh?
« Reply #1 on: May 26, 2021, 11:44:21 AM »
Ok, solved most of it, the baking had put small elevated walkable areas on objects that were supposed to be not walkable, making the results confusing.

But helped me do a lot of cleanup as I found if you use Nav Mesh Calculate Path action before you make the agent move, you get your source pos from your character, and target pos from the mouse click. Then there's a path found and path not found result in that action so you can get rid of all the out of bounds or non navmesh clicks easily as it won't find a path if it's not a click in the walkable navmesh.