Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_AccelerationManualCameraComponent.c
Go to the documentation of this file.
1
2
4[BaseContainerProps(), SCR_BaseManualCameraComponentTitle()]
6{
7 [Attribute(defvalue: "0.11", desc: "How long it takes to accelerate to full speed.")]
8 private float m_fDuration;
9
10 private float m_fProgress;
11
12 //------------------------------------------------------------------------------------------------
13 override void EOnCameraFrame(SCR_ManualCameraParam param)
14 {
15 if (param.isManualInput)
16 {
17 if (m_fProgress < 1)
18 {
19 m_fProgress = Math.Min(m_fProgress + param.timeSlice / m_fDuration, 1);
20 param.transform[3] = vector.Lerp(param.transformOriginal[3], param.transform[3], m_fProgress);
21 }
22 }
23 else
24 {
25 m_fProgress = 0;
26 }
27 }
28
29 //------------------------------------------------------------------------------------------------
30 override bool EOnCameraInit()
31 {
32 return true;
33 }
34}
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
Definition Math.c:13
Parent class from which all SCR_ManualCamera components inherit.
Parameter for carrying information between individual camera components.
float timeSlice
Frame time slice.
SCR_FieldOfViewSettings Attribute