lockCameraTo: Difference between revisions
| No edit summary | Pabstmirror (talk | contribs)  mNo edit summary | ||
| (57 intermediate revisions by 10 users not shown) | |||
| Line 1: | Line 1: | ||
| {{ | {{RV|type=command | ||
| | arma3 |=  | |game1= arma3 | ||
| |version1= 1.26 | |||
| | | |arg= local | ||
| |gr1= Camera Control | |||
| | Lock/Unlock stabilized camera  | |descr= Lock/Unlock stabilized camera to target. Works only on turrets which have optic mode selected with [[directionStabilizationEnabled|direction stabilization enabled]]. | ||
| |  | {{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}}.}} | ||
| | | {{Feature|informative|The command is local to the '''turret''' gunner, not the vehicle.}} | ||
| | | |s1= vehicle [[lockCameraTo]] [target, turretPath] | ||
| | | |p1= vehicle: [[Object]] - UAV | ||
| | | |p2= target: [[Object]] or [[Array]] format [[Position#PositionASL|PositionASL]] - use [[objNull]] to unlock | ||
| |  | |p3= turretPath: [[Array]] - path to the turret with required camera | ||
| |  | |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. | |||
| }} | }} | ||
| |s2= vehicle [[lockCameraTo]] [target, turretPath, temporary] | |||
| |s2since= arma3 2.08 | |||
| |p21= vehicle: [[Object]] - UAV | |||
| |p22= target: [[Object]] or [[Array]] format [[Position#PositionASL|PositionASL]] - use [[objNull]] to unlock | |||
| [[ | |p23= turretPath: [[Array]] - path to the turret with required camera | ||
| [[ | |||
| [[ | |p24= 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, once the turret reaches its [[getTurretLimits | limits]] the lock-on will be released. | |||
| |r2= [[Nothing]] | |||
| {{Feature|informative|This syntax also works with non-stabilized turrets, unlike {{Link|#Syntax 1}}.}} | |||
| |x1= <sqf>uav lockCameraTo [cursorObject, [0,0]];</sqf> | |||
| |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 03:07, 21 October 2025
Description
- Description:
- Lock/Unlock stabilized camera to target. Works only on turrets which have optic mode selected with direction stabilization enabled.
- 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
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, once the turret reaches its limits the lock-on will be released.
- Return Value:
- Nothing
Examples
- Example 1:
- Example 2:
- Example 3:
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
- Posted on Apr 10, 2015 - 06:54 (UTC)
- The vehicle has to have a stabilized optic for this command to work with ASL position.
 
	