Uninomicon

Documenting the dark corners of the Unity Engine.

User Tools

Site Tools


navmeshagent

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
navmeshagent [2022/02/19 16:53]
77.169.189.85 Created the NavMeshAgent page and filled in the information about remainingDistance function returning wrong value
navmeshagent [2022/02/19 19:59] (current)
uninomiconadmin
Line 1: Line 1:
-==== NavMeshAgent.RemainingDistance ====+====== NavMeshAgent ====== 
 + 
 +==== NavMeshAgent.remainingDistance ====
 This function does only respond with the current remaining distance if the path is straight. This function does only respond with the current remaining distance if the path is straight.
-It will thus return null or infinite instead of the correct distance.+It will thus return null or infinite instead of the correct distance (as defined on the [[https://docs.unity3d.com/ScriptReference/AI.NavMeshAgent-remainingDistance.html|Unity documentation]]).
 There is a way to calculate the real distance by combining all calculated paths but keep in mind that this is performance heavy. There is a way to calculate the real distance by combining all calculated paths but keep in mind that this is performance heavy.
  
-Example [[https://stackoverflow.com/questions/61421172/why-does-navmeshagent-remainingdistance-return-values-of-infinity-and-then-a-flo|On stack overflow]]: +First example on [[https://stackoverflow.com/questions/61421172/why-does-navmeshagent-remainingdistance-return-values-of-infinity-and-then-a-flo|stack-overflow]]: 
 <code csharp>  <code csharp> 
 public static class ExtensionMethods public static class ExtensionMethods
navmeshagent.1645289636.txt.gz · Last modified: 2022/02/19 16:53 by 77.169.189.85