BIS fnc camFollow: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
(Page filling)
m (Text replacement - "<code> *([^<|{]*) *<\/code>" to "<sqf>$1</sqf>")
 
(29 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Function|Comments=
{{RV|type=function
____________________________________________________________________________________________


| tkoh |Game name=
|game1= tkoh
|version1= 1.00


|1.00|Game version=
|game2= arma3
____________________________________________________________________________________________
|version2= 0.50


| Refresh a camera Field of View according to its distance with the target. |Description=
|gr1= Camera
____________________________________________________________________________________________


| [camera, target, refreshTime] call [[BIS_fnc_camFollow]] |Syntax=
|descr= Refresh a camera Field of View according to its distance with the target.


|p1= camera: [[Object]] |Parameter 1=
|s1= [camera, target, refreshTime] call [[BIS_fnc_camFollow]]


|p2= target: [[Object]] or [[Position]] |Parameter 2=
|p1= camera: [[Object]]


|p3= refreshTime: [[Number]] - (Optional, default 1) transition time in seconds. If ''refreshTime'' is '''positive''', a refresh happens only once. if ''refreshTime'' is '''negative''', the refresh will loop (with a transition time of [[abs|absolute]] ''refreshTime'') until camera [[isNull|is null]] |Parameter 3=
|p2= target: [[Object]] or [[Position]]


| [[Nothing]] |Return value=
|p3= refreshTime: [[Number]] - (Optional, default 1) transition time in seconds.
____________________________________________________________________________________________
If ''refreshTime'' is '''positive''', a refresh happens only once.
if ''refreshTime'' is '''negative''', the refresh will loop (with a transition time of [[abs|absolute]] ''refreshTime'') until camera [[isNull|is null]]


|x1= <code>_camera = "camera" [[camCreate]] (([[getPos]] [[player]]) [[vectorAdd]] [0,0,3]);
|r1= [[Nothing]]
[_camera, [[player]], -2] [[call]] [[BIS_fnc_camFollow]];</code> |Example 1=
____________________________________________________________________________________________


| [[:Category:Command Group: Camera Control|Camera commands]] ||See also=
|x1= <sqf>private _camera = "camera" camCreate ((getPos player) vectorAdd [0,0,3]);
[_camera, player, -2] call BIS_fnc_camFollow;</sqf>
 
|seealso= [[:Category:Command Group: Camera Control|Camera commands]]
}}
}}
<h3 style="display:none">Notes</h3>
<dl class="command_description">
<!-- Note Section BEGIN -->
<!-- Note Section END -->
</dl>
<h3 style="display:none">Bottom Section</h3>
[[Category:Function Group: GUI|{{uc:camFollow}}]]
[[Category:Functions|{{uc:camFollow}}]]
[[Category:{{Name|tkoh}}: Functions|{{uc:camFollow}}]]
[[Category:{{Name|arma3}}: Functions|{{uc:camFollow}}]]

Latest revision as of 23:44, 12 July 2022

Hover & click on the images for description

Description

Description:
Refresh a camera Field of View according to its distance with the target.
Execution:
call
Groups:
Camera

Syntax

Syntax:
[camera, target, refreshTime] call BIS_fnc_camFollow
Parameters:
camera: Object
target: Object or Position
refreshTime: Number - (Optional, default 1) transition time in seconds. If refreshTime is positive, a refresh happens only once. if refreshTime is negative, the refresh will loop (with a transition time of absolute refreshTime) until camera is null
Return Value:
Nothing

Examples

Example 1:
private _camera = "camera" camCreate ((getPos player) vectorAdd [0,0,3]); [_camera, player, -2] call BIS_fnc_camFollow;

Additional Information

See also:
Camera commands

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