Search Issue Tracker
Fixed in 5.0
If you call 'NavMesh.SamplePosition' with float.PositiveInfinity as max distance, it doesn't find NavMesh
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):
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.
- [IL2CPP][Android] Incorrect symbol length/symbols returned with "AndroidJavaClass"and "AndroidJavaProxy" on Android < 5.1.1
- Animating the alpha channel of a color in a material causes the RGB channels to be reset to 0
- [Mobile] TouchScreenKeyboardType is missing DecimalPad
- Memory leak in Scene Memory/RenderTexture when Scene View is active and 'Animated Materials' + 'Post Processings' toggles are on
- Ctrl + F should start search in PackageManager