Difference between revisions of "BIS fnc camFollow"

From Bohemia Interactive Community
Jump to navigation Jump to search
m (1 revision)
(Page filling)
 
Line 1: Line 1:
 +
{{Function|Comments=
 +
____________________________________________________________________________________________
  
{{Function|= Comments
+
| tkoh |Game name=
 +
 
 +
|1.00|Game version=
 
____________________________________________________________________________________________
 
____________________________________________________________________________________________
  
| tkoh |= Game name
+
| Refresh a camera Field of View according to its distance with the target. |Description=
 
 
|1.00|= Game version
 
 
____________________________________________________________________________________________
 
____________________________________________________________________________________________
  
| <pre>#define CAMUPDATE \
+
| [camera, target, refreshTime] call [[BIS_fnc_camFollow]] |Syntax=
private ["_fov"];\
 
_distance = _camera distance _cameraTarget;\
 
_fov = (10 / (_distance)) min 0.7 max 0.01;\
 
_camera campreparetarget _cameraTarget;\
 
_camera campreparefov _fov;
 
  
</pre><small>''(Placeholder description extracted from the function header by [[BIS_fnc_exportFunctionsToWiki]])''</small> |= Description
+
|p1= camera: [[Object]] |Parameter 1=
____________________________________________________________________________________________
 
  
| <!-- [] call [[BIS_fnc_camFollow]]; --> |= Syntax
+
|p2= target: [[Object]] or [[Position]] |Parameter 2=
  
|p1= |= Parameter 1
+
|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=
  
| |= Return value
+
| [[Nothing]] |Return value=
 
____________________________________________________________________________________________
 
____________________________________________________________________________________________
  
|x1= <code></code> |=  
+
|x1= <code>_camera = "camera" [[camCreate]] (([[getPos]] [[player]]) [[vectorAdd]] [0,0,3]);
 +
[_camera, [[player]], -2] [[call]] [[BIS_fnc_camFollow]];</code> |Example 1=
 
____________________________________________________________________________________________
 
____________________________________________________________________________________________
  
| |= See also
+
| [[:Category:Command Group: Camera Control|Camera commands]] ||See also=
 
 
 
}}
 
}}
  

Latest revision as of 18:43, 1 June 2018

Introduced with Take On Helicopters version 1.00
  

Click on the images for descriptions

Introduced in

Game:
Take On Helicopters
Version:
1.00

Description

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

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:
_camera = "camera" camCreate ((getPos player) vectorAdd [0,0,3]); [_camera, player, -2] call BIS_fnc_camFollow;

Additional Information

Execution:
call
Multiplayer:
-
See also:
Camera commands

Notes

Only post proven facts here. Report bugs on the feedback tracker. Use the talk page or the forums for discussions.
Add New Note | How To

Notes

Bottom Section