posWorldToScreen: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - " <h3 style="display:none">Notes</h3> <dl class="command_description"> <!-- Note Section BEGIN --> <!-- Note Section END --> </dl> " to "")
m (Text replacement - " *\| *([Cc]omments|COMMENTS|Game|[Gg]ame [Nn]ame|Game [Vv]ersion|Game Version \(number surrounded by NO SPACES\)|Multiplayer Arguments( \("local" or "global"\))?|Effects|Multiplayer Effects( \("local" or "global"\))?|Multiplayer Exe...)
Line 1: Line 1:
{{Command|Comments=
{{Command


| arma1 |Game name=
| arma1


|1.00|Game version=
|1.00


|gr1= GUI Control - Map |GROUP1=
|gr1= GUI Control - Map


|gr2= Positions |GROUP2=
|gr2= Positions


| Converts world coordinates into map screen coordinates. This command is identical to [[ctrlMapWorldToScreen]]. |DESCRIPTION=
| Converts world coordinates into map screen coordinates. This command is identical to [[ctrlMapWorldToScreen]].


| map '''posWorldToScreen''' position |SYNTAX=
| map '''posWorldToScreen''' position


|p1= map : [[Control]] - map control|PARAMETER1=
|p1= map : [[Control]] - map control


|p2= position : [[Array]] - world position in format [[Position2D]] or [[Position3D]] |PARAMETER2=
|p2= position : [[Array]] - world position in format [[Position2D]] or [[Position3D]]


| [[Array]] - screen coordinates in format [x, y] |RETURNVALUE=
| [[Array]] - screen coordinates in format [x, y]


   
   
|x1= <code>_screenCoord = _control [[posWorldToScreen]] _worldCoord;</code> |EXAMPLE1=
|x1= <code>_screenCoord = _control [[posWorldToScreen]] _worldCoord;</code>
|x2= <code>_screenCoord = _control [[posWorldToScreen]] [[position]] [[player]];</code> |EXAMPLE2=
|x2= <code>_screenCoord = _control [[posWorldToScreen]] [[position]] [[player]];</code>


| [[posScreenToWorld]], [[ctrlMapWorldToScreen]] |SEEALSO=
| [[posScreenToWorld]], [[ctrlMapWorldToScreen]]


}}
}}

Revision as of 02:12, 18 January 2021

Hover & click on the images for description

Description

Description:
Converts world coordinates into map screen coordinates. This command is identical to ctrlMapWorldToScreen.
Groups:
GUI Control - MapPositions

Syntax

Syntax:
map posWorldToScreen position
Parameters:
map : Control - map control
position : Array - world position in format Position2D or Position3D
Return Value:
Array - screen coordinates in format [x, y]

Examples

Example 1:
_screenCoord = _control posWorldToScreen _worldCoord;
Example 2:
_screenCoord = _control posWorldToScreen position player;

Additional Information

See also:
posScreenToWorldctrlMapWorldToScreen

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

Bottom Section