View Single Post
Mystik Spiral
Senior Member
Join Date: Oct 2020
Location: Orlando, FL
Old 02-23-2024 , 21:26   Re: Calculate NAV distance between entities
Reply With Quote #2

Here is more detail:

I want to prevent a bot from taking pain_pills when they are within a certain distance of the checkpoint (maybe 2250 hammer units), but I do not want to prevent them from using pain_pills if they are too close ONLY because they are under (or over) the checkpoint. I was thinking about calculating distance using only X.Y but ignore the value and return false (not too close) if the Z angle is more than about 20 to 30 degrees.

I do not need the actual navigation distance, just a boolean to help prevent bots from wasting pain_pills when they are close to the checkpoint.

While thinking about this, it seems funny that I cannot recall any maps where the checkpoint is entered vertically, like climbing/descending a ladder to the checkpoint and then closing a hatch in the floor/ceiling. The closest one I can think of is Death Aboard 2 map 3 (l4d_deathaboard03_docks).
__________________
Mystik Spiral is offline