mapCenterOnCamera: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "\| *s([0-9]) *=([^ ]+) *\{\{Since\|(.+)\|([0-9]\.[0-9]7)[^ ]+\}\} " to "|s$1= $2 |s$1since= $3 $4THEINCREDIBLEHULK8 ")
m (Some wiki formatting)
 
(14 intermediate revisions by the same user not shown)
Line 15: Line 15:
|gr1= GUI Control - Map
|gr1= GUI Control - Map


|descr= <tt>ctrl [[mapCenterOnCamera]] enable</tt> syntax enables/disables continuous centering of the main map type control on the camera position. Needs to be executed once.<br>
|descr= The main syntax enables/disables continuous centering of the main map type control on the camera position. Needs to be executed once.<br>
<tt>[[mapCenterOnCamera]] ctrl</tt> syntax centers mini map type control on camera. The command returns world position of the camera. Needs to be executed each frame (preferably inside onDraw EH).
The alternative syntax centers mini map type control on camera. Needs to be executed each frame (preferably inside an {{hl|onDraw}} event handler).


|s1= mainmap [[mapCenterOnCamera]] enable
|s1= mainmap [[mapCenterOnCamera]] enable
Line 26: Line 26:
|r1= [[Nothing]]
|r1= [[Nothing]]


|s2= [[mapCenterOnCamera]]  minimap
|s2= [[mapCenterOnCamera]]  minimap


|s2since= arma3 1.47THEINCREDIBLEHULK8
|s2since= arma3 1.48


|p21= minimap: [[Control]]
|p21= minimap: [[Control]]


|r2= [[Array]] - [[PositionWorld]] of the map center (camera focus object) in render scope
|r2= [[Array]] in format [[Position#PositionASL|PositionASL]] of the map center (camera focus object's '''model centre'''<nowiki/>'s position (see [[getPosWorld]])) in render scope


|x1= <code>{{cc|--- Minimap update}}
|x1= <sqf>
(([[uiNamespace]] [[getVariable]] "BIS_UAV_DISPLAY") [[displayCtrl]] 112410) [[mapCenterOnCamera]] [[true]];</code>
// --- Minimap update
((uiNamespace getVariable "BIS_UAV_DISPLAY") displayCtrl 112410) mapCenterOnCamera true;
</sqf>


|seealso= [[ctrlMapAnimAdd]], [[ctrlMapAnimCommit]], [[getPosWorld]]
|seealso= [[ctrlMapAnimAdd]] [[ctrlMapAnimCommit]] [[getPosWorld]]
}}
}}

Latest revision as of 10:34, 19 April 2024

Hover & click on the images for description

Description

Description:
The main syntax enables/disables continuous centering of the main map type control on the camera position. Needs to be executed once.
The alternative syntax centers mini map type control on camera. Needs to be executed each frame (preferably inside an onDraw event handler).
Groups:
GUI Control - Map

Syntax

Syntax:
mainmap mapCenterOnCamera enable
Parameters:
mainmap: Control
enable: Boolean
Return Value:
Nothing

Alternative Syntax

Syntax:
mapCenterOnCamera minimap
Parameters:
minimap: Control
Return Value:
Array in format PositionASL of the map center (camera focus object's model centre's position (see getPosWorld)) in render scope

Examples

Example 1:
// --- Minimap update ((uiNamespace getVariable "BIS_UAV_DISPLAY") displayCtrl 112410) mapCenterOnCamera true;

Additional Information

See also:
ctrlMapAnimAdd ctrlMapAnimCommit getPosWorld

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