Page MenuHomeFeedback Tracker

[Bug][AI][Easy to Fix] When AI are ordered to get in a vehicle, the expectedDestination is always at 0 AGL height
New, NormalPublic

Description

0 AGL height means at the ground/sea level.

This causes the path calculation to generate an incorrect path. Therefore, the AI can't get into a vehicle that is on top of another object (e.g. a helicopter on top of a carrier or ship)

You can fix this by ensuring that the destination height is equal to the vehicle's AGL height (if the vehicle is touching the ground, of course, otherwise the path generation may fail for, e.g. a heli that is still in the air and is trying to land). It's very easy to fix.

Details

Severity
Major
Resolution
Open
Reproducibility
Always
Operating System
Windows 7
Category
AI Pathfinding / Motion
Steps To Reproduce
  1. Place a vehicle on top of another object (e.g. a heli on top of the carrier)
  2. Tell your AI subordinate to mount the vehicle.
  3. Test this command:

expectedDestination AI select 0 select 2
Notice that the AGL height is 0, even though the vehicle is at a positive AGL height.

Additional Information

SQF sample of what the fix should look like:

//_desintaion is whatever you used to generate before; you only need to change the height
_destination set [2, If (isTouchingGround _vehicle) then {
   ASLtoAGL getPosASL _vehicle select 2
} else {
   0
}]

Event Timeline

Leopard20 updated the task description. (Show Details)Sep 10 2020, 3:36 PM
Leopard20 edited Additional Information. (Show Details)Sep 10 2020, 3:41 PM
Leopard20 edited Additional Information. (Show Details)
Leopard20 edited Additional Information. (Show Details)
Leopard20 updated the task description. (Show Details)Sep 10 2020, 3:48 PM
h- added a subscriber: h-.Sep 10 2020, 5:38 PM

I had to use ASL with move/doMove to get AI to move at all. Could be related

move, moveTo and doMove require AGL positions though.

"normally" yes (at last as it seems and would make sense). however especially with short distance move orders, close to objects, only ASL seems to work (in A3 - prior to A3 it hasnt been a problem)

I think it "works" because you're telling them to go to a position that doesn't exist. I'm pretty sure that if you do this the AI might walk through objects more frequently than normal. Is that correct?

The AI doesnt walk through objects in my cases as there is nothing blocking. In any case the theory sounds plausible.