lockCameraTo: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
mNo edit summary
m (Add lockedCameraTo seeAlso link)
 
(48 intermediate revisions by 6 users not shown)
Line 1: Line 1:
{{Command|= Comments
{{RV|type=command
____________________________________________________________________________________________


| arma3 |= Game name
|game1= arma3
|version1= 1.26


|1.26|= Game version
|arg= local


____________________________________________________________________________________________
|gr1= Camera Control


| Lock/Unlock stabilized camera (in vanilla used currently only for UAVs) to target. |= Description
|descr= Lock/Unlock stabilized camera to target. Works only on turrets which have optic mode selected with [[directionStabilizationEnabled|direction stabilization enabled]].
____________________________________________________________________________________________


| vehicle '''lockCameraTo''' [target, turretPath]|= Syntax
{{Feature|informative|Since {{GVI|arma3|2.08}} the command also works with non-stabilized turrets (such as main turret of a tank). See {{Link|#Alternative_Syntax|syntax 2}}.}}


|p1= vehicle: [[Object]] - UAV |= Parameter 1
{{Feature|informative|The command is local to the '''turret''' gunner, not the vehicle.}}


|p2= [target, turretPath]: [[Array]] |= Parameter 2
|s1= vehicle [[lockCameraTo]] [target, turretPath]


|p3= target: [[Object]] or [[PositionASL]] - use [[objNull]] for unlocking |= Parameter 3
|p1= vehicle: [[Object]] - UAV


|p4= turretPath: [[Array]] - path to the turret with required camera |= Parameter 4
|p2= target: [[Object]] or [[Array]] format [[Position#PositionASL|PositionASL]] - use [[objNull]] to unlock


| [[Nothing]] |= Return value
|p3= turretPath: [[Array]] - path to the turret with required camera
____________________________________________________________________________________________
 
|x1= <code>uav [[lockCameraTo]] [vehicle, [0,0]];</code> |= Example 1
____________________________________________________________________________________________


| |= See also
|r1= [[Nothing]]


{{Feature|important|
* This syntax only works with stabilized turrets.
* When using this syntax, if target is out of possible view, the turret will move to its limit and get stuck there, with blocked input.
}}
}}


<h3 style="display:none">Notes</h3>
|s2= vehicle [[lockCameraTo]] [target, turretPath, temporary]
<dl class="command_description">
<!-- Note Section BEGIN -->


<!-- Note Section END -->
|s2since= arma3 2.08
</dl>


<h3 style="display:none">Bottom Section</h3>
|p21= vehicle: [[Object]] - UAV


|p22= target: [[Object]] or [[Array]] format [[Position#PositionASL|PositionASL]] - use [[objNull]] to unlock


[[Category:Arma_3:_New_Scripting_Commands_List|{{uc:{{PAGENAME}}}}]]
|p23= turretPath: [[Array]] - path to the turret with required camera
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]
[[Category:Command Group: Camera Control|lockCameraTo]]


<!-- CONTINUE Notes -->
|p24= temporary: [[Boolean]] - if set to [[true]], the engine will automatically remove the lock-on once the turret reaches its target.
<dl class="command_description">
If the target is out of turret's reach, the turret will move to the maximum of its capacity towards the target.
<dd class="notedate">Posted on April 10, 2015 - 06:54 (UTC)</dd>
 
<dt class="note">[[User:Commy2|Commy2]]</dt>
|r2= [[Nothing]]
<dd class="note">
 
The command also accepts a position (ASL) instead of an object. The vehicle has to have a stabilized optic for this command to work.
{{Feature|informative|This syntax also works with non-stabilised turrets, unlike {{Link|#Syntax 1}}.}}
</dd>
 
</dl>
|x1= <sqf>uav lockCameraTo [vehicle, [0,0]];</sqf>
<!-- DISCONTINUE Notes -->
 
|x2= <sqf>uav lockCameraTo [objNull, [0,0]]; // unlocks the turret</sqf>
 
|x3= <sqf>vehicle player lockCameraTo [enemyTarget, vehicle player unitTurret player, false];</sqf>
 
|seealso= [[lockedCameraTo]] [[camTarget]] [[camSetTarget]] [[camPrepareTarget]] [[directionStabilizationEnabled]] [[enableDirectionStabilization]]
}}
 
{{Note
|user= Commy2
|timestamp= 20150410065400
|text= The vehicle has to have a stabilized optic for this command to work with ASL position.
}}

Latest revision as of 22:57, 29 March 2023

Hover & click on the images for description

Description

Description:
Lock/Unlock stabilized camera to target. Works only on turrets which have optic mode selected with direction stabilization enabled.
Since Arma 3 logo black.png2.08 the command also works with non-stabilized turrets (such as main turret of a tank). See syntax 2.
The command is local to the turret gunner, not the vehicle.
Groups:
Camera Control

Syntax

Syntax:
vehicle lockCameraTo [target, turretPath]
Parameters:
vehicle: Object - UAV
target: Object or Array format PositionASL - use objNull to unlock
turretPath: Array - path to the turret with required camera
Return Value:
Nothing
  • This syntax only works with stabilized turrets.
  • When using this syntax, if target is out of possible view, the turret will move to its limit and get stuck there, with blocked input.

Alternative Syntax

Syntax:
vehicle lockCameraTo [target, turretPath, temporary]
Parameters:
vehicle: Object - UAV
target: Object or Array format PositionASL - use objNull to unlock
turretPath: Array - path to the turret with required camera
temporary: Boolean - if set to true, the engine will automatically remove the lock-on once the turret reaches its target. If the target is out of turret's reach, the turret will move to the maximum of its capacity towards the target.
Return Value:
Nothing
This syntax also works with non-stabilised turrets, unlike Syntax 1.

Examples

Example 1:
uav lockCameraTo [vehicle, [0,0]];
Example 2:
uav lockCameraTo [objNull, [0,0]]; // unlocks the turret
Example 3:
vehicle player lockCameraTo [enemyTarget, vehicle player unitTurret player, false];

Additional Information

See also:
lockedCameraTo camTarget camSetTarget camPrepareTarget directionStabilizationEnabled enableDirectionStabilization

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
Commy2 - c
Posted on Apr 10, 2015 - 06:54 (UTC)
The vehicle has to have a stabilized optic for this command to work with ASL position.