Search Issue Tracker
By Design
Votes
2
Found in
2017.4
2018.4
2018.4.13f1
2019.2
2019.3
2020.1
Issue ID
1204225
Regression
No
NavAgent gets stuck inside GameObject with NavMeshObstacle Component when obstacle's size is increased
How to reproduce:
1. Open the attached project's Scene labeled "NavMeshJumpBugExample"
2. Enable "MaxJump19-NavObstacle" GameObject in Hierarchy
3. Enter the Play Mode
4. Observe NavAgent's behavior
5. Exit Play Mode
6. Disable the previously enabled GameObject
7. Enable "NoJump19.01-NavObstacle" GameObject in Hierarchy
8. Observe NavAgent's behavior
Expected result: NavAgent gets unstuck
Actual result: NavAgent is stuck in the NavMeshObstacle
Reproducible with: 2017.4.35f1, 2018.4.13f1, 2019.2.15f1, 2019.3.0f1, 2020.1.0a15
----------------------
Information from developer:
It is expected that the NavMeshAgent will look for a NavMesh only within a volume of this size (20 * agent.radius, 15 * agent.radius, 20 * agent.radius) centred at the Agent (where radius is the value defined for obstacle avoidance purposes). In this reported issue the obstacle is 19.1 units wide and there will be one extra unit (= 2 * 0.5) being carved around the obstacle. Because the NavMesh is more than 10 units away the Agent will not be able to find it automatically.
Please use `NavMesh.SamplePosition()` to find a new position on the NavMesh where the agent should be moved.
Another solution would be to move the agent closer to the borders of the Obstacle.
Comments (1)
-
aFeesh
Dec 11, 2019 18:58
This issue is related to this Forum topic: https://forum.unity.com/threads/changing-max-jump-distance-in-unity-nav-mesh.788474/ there's a workaround, but it's not as intuitive as the expected result.
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Out-of-bounds memory access with multiple CanvasRenderers under a Canvas when using Mesh API
- Package signature validation unexpectedly return an invalid signature status if the validation check is done after the code signing certificate validaty range has passed
- Inspector tries to access file after it was deleted when the file was locked in Inspector window
- Changing Transform values in Search window Inspector loses focus while dragging and stopping mouse without releasing dragging action
- Saving changes on the dirty VFX Graph during the Play mode throws "The referenced script (Unknown) on this Behaviour is missing!" warnings
Resolution Note (2017.4.0):
Information from developer:
It is expected that the NavMeshAgent will look for a NavMesh only within a volume of this size (20 * agent.radius, 15 * agent.radius, 20 * agent.radius) centred at the Agent (where radius is the value defined for obstacle avoidance purposes). In this reported issue the obstacle is 19.1 units wide and there will be one extra unit (= 2 * 0.5) being carved around the obstacle. Because the NavMesh is more than 10 units away the Agent will not be able to find it automatically.
Please use `NavMesh.SamplePosition()` to find a new position on the NavMesh where the agent should be moved.
Another solution would be to move the agent closer to the borders of the Obstacle.