Search Issue Tracker
Fixed in 2017.2.0f3
Votes
0
Found in
2017.2.0f2
Issue ID
973726
Regression
No
NavMesh.SamplePosition always returns False with a specified built-in Area type
Steps to reproduce:
1. Open attached “NavMesh.zip” Unity project
2. Open “Main” scene
3. Enter Play mode
4. Observe Console window
Expected results:
NavMesh.SamplePosition with a specified ‘Walkable’ areaMask returns True
Actual results:
NavMesh.SamplePosition returns False
Reproduced in: 2018.1.0a7, 2017.3.0f1, 2017.2.0p4, 2017.1.2p3, 2017.1.2p3, 5.6.4p3, 5.6.0f1
-----------------------
By design:
Incorrect areaMask parameter passed to NavMesh.SamplePosition.
Correct usage:
var areaMaskFromName = 1 << NavMesh.GetAreaFromName("Walkable")
found = NavMesh.SamplePosition(transform.position, out result, 10, areaMaskFromName);
Comments (1)
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
- Duplicate External Textures start appearing when a Texture created with "CreateExternalTexture" is modified causing Memory Usage spikes on VisionOS
- Silent crash when using a "Blend Shape" in a "Skinned Mesh Renderer" to move vertices to Vector3.positiveInfinity, and "Occlusion Culling" is baked
- Some Prefab Source and Override content bounds are misaligned
- The Package Manager's "install packages by..." panels break when Domain Reload is triggered, and the panel is open
- Crash with multiple stack traces when leaving a docked VFX Graph open
kru2zz
Nov 13, 2018 06:50
OMG! spent few hours on this. This should really be specified more clearly in the docs example!