146{
149
152
153
155 {
158 {
159 Print(
"DayZPlayerCamera1stPerson: main bone not found");
160 }
161
163 }
164
165
166
168 {
169 super.OnActivate(pPrevCamera, pPrevCameraResult);
170
171 if (pPrevCamera)
172 {
173 vector baseAngles = pPrevCamera.GetBaseAngles();
176
177 vector addAngles = pPrevCamera.GetAdditiveAngles();
180 }
181 }
182
183
185 {
189
193
195 pOutResult.m_iDirectBoneMode = 1;
196 pOutResult.m_fUseHeading = 1.0;
197 pOutResult.m_fInsideCamera = 1.0;
198
199 pOutResult.m_fNearPlane = 0.04;
200
202
206 }
207
209 {
213 a[2] = 0;
214 return a;
215 }
216
218 {
222 a[2] = 0;
223 return a;
224 }
225
227 {
228 return "DayZPlayerCamera1stPerson";
229 }
230
233
238}
239
240
241
242
244{
246 {
248 }
249
251 {
252 super.OnUpdate(pDt, pOutResult);
253
255 pOutResult.m_iDirectBoneMode = 4;
256 pOutResult.m_fUseHeading = 0.0;
257
258 vector rot;
259 rot[0] = 0;
260 rot[1] = 90;
261 rot[2] = 0;
262
263 Math3D.YawPitchRollMatrix(rot, pOutResult.m_CameraTM);
264 }
265}
void DayZPlayerCamera1stPerson(DayZPlayer pPlayer, HumanInputController pInput)
int m_iBoneIndex
main bone
float m_fLeftRightAngle
left right angle in rad (in freelook only)
float m_fUpDownAngle
up down angle in rad
static const float CONST_UD_MAX
up limit
float m_fLeftRightAngleAdd
left right angle in rad (in freelook only)
float m_fUpDownAngleAdd
up down angle in rad
static const float CONST_LR_MIN
down limit
override vector GetBaseAngles()
static const float CONST_LR_MAX
up limit
static const float CONST_UD_MIN
down limit
override vector GetAdditiveAngles()
class DayZPlayerCamera1stPerson extends DayZPlayerCameraBase DayZPlayerCamera1stPersonUnconscious(DayZPlayer pPlayer, HumanInputController pInput)
vector m_OffsetLS
position offset
override string GetCameraName()
float UpdateLRAngleUnlocked(out float pAngle, out float pAngleAdd, float pMin, float pMax, float pDt)
float m_CurrentCameraPitch
float UpdateUDAngleUnlocked(out float pAngle, out float pAngleAdd, float pMin, float pMax, float pDt)
void StdFovUpdate(float pDt, out DayZPlayerCameraResult pOutResult)
void InitCameraOnPlayer(bool force=false)
void UpdateCameraNV(PlayerBase player)
void ProcessCameraShake(float delta, out float leftRight, out float upDown)
void DayZPlayerCameraResult()
cannot be instanced from script (always created from C++)
class DayZPlayerCameraResult DayZPlayerCamera(DayZPlayer pPlayer, HumanInputController pInput)
vector GetCurrentOrientation()
proto void Print(void var)
Prints content of variable to console/log.
static proto void YawPitchRollMatrix(vector ang, out vector mat[3])
Creates rotation matrix from angles.