View Single Post
Author Message
Mystik Spiral
Senior Member
Join Date: Oct 2020
Location: Orlando, FL
Old 02-23-2024 , 20:14   Calculate NAV distance between entities
Reply With Quote #1

I could use some help with how to calculate the NAVIGATION distance between two entities. I already know how to calculate the vector distance (that is what I am using now), but it does not work for enough scenarios.

Simple example... how far is it to the checkpoint?

Scenario: You are in a tunnel directly under the checkpoint, so your vector distance is very small. However, to get out of a long tunnel and navigate back to the checkpoint could be a very large distance.

How do I calculate the navigation distance to the checkpoint?

I suspect the "correct" answer involves a complex routine, but I do not need a precise answer... a good approximation will work fine. Perhaps something that calculates the Z angle between two entities and ignores anything higher than a certain angle?

I appreciate any help, thank you!
__________________

Last edited by Mystik Spiral; 02-24-2024 at 10:35.
Mystik Spiral is offline