mapCenterOnCamera: Difference between revisions
Jump to navigation
Jump to search
(version, syntax) |
Lou Montana (talk | contribs) m (Some wiki formatting) |
||
(60 intermediate revisions by 7 users not shown) | |||
Line 1: | Line 1: | ||
{{ | {{RV|type=command | ||
| arma2 |= | |game1= arma2 | ||
|version1= 1.02 | |||
|1. | |game2= arma2oa | ||
|version2= 1.50 | |||
| | |game3= tkoh | ||
|version3= 1.00 | |||
| | |game4= arma3 | ||
|version4= 0.50 | |||
| | |gr1= GUI Control - Map | ||
| | |descr= The main syntax enables/disables continuous centering of the main map type control on the camera position. Needs to be executed once.<br> | ||
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 | ||
|p1= mainmap: [[Control]] | |||
| | |p2= enable: [[Boolean]] | ||
|r1= [[Nothing]] | |||
| | |s2= [[mapCenterOnCamera]] minimap | ||
| | |s2since= arma3 1.48 | ||
|p21= minimap: [[Control]] | |||
|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= <sqf> | ||
</ | // --- Minimap update | ||
((uiNamespace getVariable "BIS_UAV_DISPLAY") displayCtrl 112410) mapCenterOnCamera true; | |||
</sqf> | |||
|seealso= [[ctrlMapAnimAdd]] [[ctrlMapAnimCommit]] [[getPosWorld]] | |||
[[ | }} | ||
[[ | |||
[[ |
Latest revision as of 10:34, 19 April 2024
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