This shows you the differences between two versions of the page.
Last revision Both sides next 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 16:57] oddept Minor changes for readability I forgot to change on initial creation. |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ==== NavMeshAgent.RemainingDistance | + | ==== 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 |
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 | + | First example on [[https:// |
<code csharp> | <code csharp> | ||
public static class ExtensionMethods | public static class ExtensionMethods |