lockCameraTo: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - " |r1=[[" to " |r1= [[") |
Lou Montana (talk | contribs) (Add 2.08 syntax) |
||
Line 6: | Line 6: | ||
|gr1= Camera Control | |gr1= Camera Control | ||
|descr= Lock/Unlock stabilized camera to target. Works only on turrets which have optic mode selected with [[ | |descr= Lock/Unlock stabilized camera to target. Works only on turrets which have optic mode selected with [[directionStabilizationEnabled|direction stabilization enabled]]. | ||
|s1= vehicle [[lockCameraTo]] [target, turretPath] | |s1= vehicle [[lockCameraTo]] [target, turretPath, temporary] | ||
|p1= vehicle: [[Object]] - UAV | |p1= vehicle: [[Object]] - UAV | ||
|p2= target: [[Object]] or [[PositionASL]] - use [[objNull]] | |p2= target: [[Object]] or [[Position#PositionASL|PositionASL]] - use [[objNull]] to unlock | ||
|p3= turretPath: [[Array]] - path to the turret with required camera | |p3= turretPath: [[Array]] - path to the turret with required camera | ||
|p4= temporary: [[Boolean]] - (Optional, default [[false]]) if set, the syntax also works with non-stabilised turrets.<br> | |||
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. | |||
{{Feature|important|If ''temporary'' is '''not''' set and target is out of possible view, the turret will move to its limit and get stuck there, with blocked input.}} | |||
|p4since= arma3 2.08 | |||
|r1= [[Nothing]] | |r1= [[Nothing]] | ||
Line 22: | Line 28: | ||
|x2= <code>uav [[lockCameraTo]] [<nowiki/>[[objNull]], [0,0]]; {{cc|unlocks the turret}}</code> | |x2= <code>uav [[lockCameraTo]] [<nowiki/>[[objNull]], [0,0]]; {{cc|unlocks the turret}}</code> | ||
|seealso= [[camTarget]] [[camSetTarget]] [[camPrepareTarget]] [[directionStabilizationEnabled]] | |x3= <code>[[vehicle]] [[player]] [[lockCameraTo]] [enemyTarget, [[vehicle]] [[player]] [[unitTurret]] [[player]], [[false]]];</code> | ||
|seealso= [[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. | |||
}} | |||
The vehicle has to have a stabilized optic for this command to work with ASL position. | |||
Revision as of 16:49, 5 January 2022
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, temporary]
- Parameters:
- vehicle: Object - UAV
- target: Object or PositionASL - use objNull to unlock
- turretPath: Array - path to the turret with required camera
- since 2.08
- temporary: Boolean - (Optional, default false) if set, the syntax also works with non-stabilised turrets.
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
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:
- 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.