From Bohemia Interactive Community
- Leopard20 - c
- Posted on Jan 26, 2022 - 15:15 (UTC)
-
Note that this command returns the position in AGLS format (Z is measured from the nearest surface below). For example the value of Z is 0 even if the object is resting on top of a building.
For use with draw commands, such as drawIcon3D, an AGL position is needed. The following alternatives can be used, depending on where the icon is intended to be shown:
ASLtoAGL getPosWorldVisual _object // object center in model coordinates, i.e [0,0,0]
ASLtoAGL getPosASLVisual _object // object land contact (e.g. floor of a building)
unitAimPositionVisual _object // object's aiming position, i.e where the AI aim at, such as a soldier's chest
_object modelToWorldVisual _relativePos // custom position in model coordinates. if _relativePos is [0,0,0], it'll be the same as ASLtoAGL getPosWorldVisual _object