It should be simple but I have no idea how to do it.
I have a player character that moves with the NavMeshAgent, and I have a system where my character can roll, this also uses the NavMeshAgent because it works with the system I have set up already. On open ground this works exactly as I want it to, but when I roll towards an obstacle such as a wall without enough space to actually roll, what should happen is my character simply smashes his face against the wall like a dumdum. Instead, he tries to go around the wall.
Simply put, I would like to be able to temporarily turn off a navAgent’s obstacle avoidance entirely.
How does do?
Hello,
Thanks for asking this because, I faced similar kind of issue last time, I am still searching for some proper solution Same issue still no fix to this. My Insite Sign In
This is probably a bizarre request - I would like to have my agents not knowing the entire map. For example, a wolf sees you across an iron bar gate, if using regular navmeshagent on the wolf, he would (very intelligently) run a mile around the walls and find a way to you and attack you. It’s not very realistic. Ideally the wolf would not know how to get to you, so he just run to the iron gate (of course, bypassing whatever obstacles between him and the gate) and howl at you or something.
It would be nice if there are two things that can be done by navmeshagent:
Check if the calculated path is too long (this can be done using “remainingDistance”)
If it is too long, calculate a closest reachable location (i.e. right behind the iron gate)
I’m not sure how #2 can be done. I know there are navmesh areas, and area mask, is it possible to calculate path only within a certain area so as a last resort the agent will go to the closest reachable location?
Please Help Us
Thank you