- Home /
Detecting obstacles in navmesh (so AI can attack them)
I already found solution i just wonder if is there less hacky way: Original idea was disable obstacles when calculating path, store corners and raycast them. But i can't disable NavMeshObstacle (or carving) immediately, probably mesh is recalculated at the end of frame. Is there way to recalculate navmesh carving immediately?
My hacky solution: I added NavMeshLink over every NavMeshObstacle and disabled it, now in code i can enable links before calculate path and then disable them again and then raycast corners.
Your answer
![](https://koobas.hobune.stream/wayback/20220612214015im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
What is the difference between configuration of agent in 'Agents' tab and in 'Bake' tab Unity? 1 Answer
How to Create a Unique Waypoint List for Each Prefab Unit ?? 2 Answers
Way to find closest point in a specific area on navmesh. 0 Answers
How to make NavMeshAgents traverse two possible paths 1 Answer
Y-axis rotation changing on its own? (NavMesh agent + terrain alignment) 0 Answers