Search Issue Tracker
Fixed in 5.0.X
Votes
0
Found in
4.5.0f6
Issue ID
610061
Regression
Yes
If you call 'NavMesh.SamplePosition' with float.PositiveInfinity as max distance, it doesn't find NavMesh
To reproduce:
1) Create new project
2) Add a plane
3) Bake a NavMesh on it through Navigation panel
4) Attach a script with this in either Start() or Update() to a GameObject (Main Camera works):
//C#
NavMeshHit hit;
NavMesh.SamplePosition(transform.position, out hit, float.PositiveInfinity, 1);
Debug.Log("Hit: " + hit.hit);
Debug.Log("Position: " + hit.position);
Debug.Log("Distance: " + hit.distance);
5) Play the scene, notice that there was no hit.
If you change float.PositiveInfinity to a number, it gets a hit.
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- [iOS] Application.absoluteURL is empty on Awake/Start when opening via deep link with Splash Screen disabled
- Crash on MemoryManager::Deallocate when rapidly calling Addressables.LoadAssetAsync
- Crash on physx::shdfnd::atomicIncrement when adjusting values on a character controller component after entering Play mode in Prefab edit mode
- [Rendering Debugger] [NewInputSystem] Debug Overlays in Play mode throws InvalidOperationException when using New Input System
- [RenderingDebugger][InputSystemPackage] Ctrl+Backspace shortcut doesn't work to open the Rendering Debugger when New Input System is in use
Add comment