visiblePosition: Difference between revisions
Jump to navigation
Jump to search
(remove note) |
No edit summary |
||
Line 26: | Line 26: | ||
|seealso= [[getPosVisual]] [[getPosATLVisual]] [[getPosASLVisual]] [[getPosWorldVisual]] [[visiblePositionASL]] [[position]] [[getPos]] [[getPosATL]] [[getPosASL]] [[getPosASLW]] | |seealso= [[getPosVisual]] [[getPosATLVisual]] [[getPosASLVisual]] [[getPosWorldVisual]] [[visiblePositionASL]] [[position]] [[getPos]] [[getPosATL]] [[getPosASL]] [[getPosASLW]] | ||
}} | |||
{{Note | |||
|user= Leopard20 | |||
|timestamp= 20220126151506 | |||
|text= Note that this command returns the position in [[Position#PositionAGLS|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.<br> | |||
For use with draw commands, such as [[drawIcon3D]], an [[Position#PositionAGL|AGL]] position is needed. The following alternatives can be used, depending on where the icon is intended to be shown: | |||
<code>[[ASLtoAGL]] [[getPosWorld]] _object {{cc|the object center in model coordinates}} | |||
[[ASLtoAGL]] [[getPosASL]] _object {{cc|object land contact (e.g. floor of a building)}} | |||
[[unitAimPositionVisual]] _object {{cc|object's aiming position, i.e where the AI aim at, such as a soldier's chest}} | |||
</code> | |||
}} | }} |
Revision as of 16:15, 26 January 2022
Description
- Description:
- Returns an object's rendered position (z value above surface underneath) in render time scope. Same as getPosVisual.
- Groups:
- PositionsRender Time Scope
Syntax
- Syntax:
- visiblePosition object
- Parameters:
- object: Object - name of the object
- Return Value:
- PositionAGLS
Examples
- Example 1:
playerRenderedPos = visiblePosition player;
Additional Information
- See also:
- getPosVisual getPosATLVisual getPosASLVisual getPosWorldVisual visiblePositionASL position getPos getPosATL getPosASL getPosASLW
Notes
-
Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note
- 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 getPosWorld _object // the object center in model coordinates ASLtoAGL getPosASL _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