Created
September 22, 2018 21:58
-
-
Save veteran29/9e579e74e0b8e7bfd71f57e1475a4426 to your computer and use it in GitHub Desktop.
camera_focus.sqf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Author: KP Liberation Dev Team - https://github.com/KillahPotatoes | |
Date: 2018-09-20 | |
Last Update: 2018-09-20 | |
License: GNU General Public License v3.0 - https://www.gnu.org/licenses/gpl-3.0.html | |
Description: | |
Creates camera that will start at given position and focus on target | |
Parameter(s): | |
0: OBJECT/ARRAY - Camera start position | |
1: OBJECT/ARRAY - Camera target position | |
Returns: | |
CAMERA | |
*/ | |
params [ | |
["_start", nil, [objNull, []], 3], | |
["_target", nil, [objNull, []], 3] | |
]; | |
// Get Pos AGL for camera | |
if (_start isEqualType objNull) then { | |
_start = ASLToAGL getPosASL _start; | |
}; | |
private _camera = "camera" camCreate _start; | |
_camera cameraeffect ["internal","back"]; | |
showCinemaBorder false; | |
_camera camPrepareTarget _target; | |
_camera camPrepareFov 0.3; | |
_camera camPreparePos (_start vectorAdd [0,0, 25]); | |
cutText ["", "BLACK FADED"]; | |
[{ | |
cutText ["", "BLACK IN", 5]; | |
_this camCommitPrepared 8; | |
}, _camera, 1] call CBA_fnc_waitAndExecute; | |
_camera |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment