ctrlMapWorldToScreen: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
(error in syntax)
(see also)
Line 7: Line 7:
____________________________________________________________________________________________
____________________________________________________________________________________________


| Transfers a map control world position to screen coordinates. |= Description
| Converts world coordinates into map screen coordinates. This command is identical to [[posWorldToScreen]].  |= Description
____________________________________________________________________________________________
____________________________________________________________________________________________


| control '''ctrlMapWorldToScreen''' position |= Syntax
| control '''posWorldToScreen''' position |= Syntax


|p1= control: [[Control]] |= Parameter 1
|p1= control : [[Control]] - map control|= Parameter 1
|p2= position: [[Position]] |= Parameter 2


| [[Array]] ([[Position2D]] Format) |= Return value
|p2= position : [[Array]] - world position in format [[Object]], [[Position2D]] or [[Position3D]] |= Parameter 1
 
| [[Array]] - screen coordinates in format [x, y] |= Return value
____________________________________________________________________________________________
____________________________________________________________________________________________
   
   
Line 23: Line 24:
____________________________________________________________________________________________
____________________________________________________________________________________________


| [[ctrlMapScreenToWorld]] |= See also
| [[ctrlMapScreenToWorld]], [[posWorldToScreen]] |= See also


}}
}}

Revision as of 13:33, 4 February 2019

-wrong parameter ("Arma") defined!-1.05
Hover & click on the images for description

Description

Description:
Converts world coordinates into map screen coordinates. This command is identical to posWorldToScreen.
Groups:
Uncategorised

Syntax

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

Examples

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

Additional Information

See also:
ctrlMapScreenToWorldposWorldToScreen

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

Notes

Posted on June 16, 2010
kju
Notes: It returns a 2d array with the position on the active map display. Say the return [0.5.0.5] would mean that your input 3d world position, like [500,1000], is currently at the center of the active map display.
In other words you can make the actual world position (of an object for example), relative to your active map display.

Bottom Section