Dayz Explorer  1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
dayzplayercamera3rdperson.c
Go to the documentation of this file.
1 // *************************************************************************************
2 // ! DayZPlayerCamera3rdPerson - base for 3rd person cameras
3 // *************************************************************************************
5 {
6  static const float CONST_UD_MIN = -85.0;
7  static const float CONST_UD_MAX = 85.0;
8 
9  static const float CONST_LR_MIN = -160.0;
10  static const float CONST_LR_MAX = 160.0;
11 
13  {
14  if (pInput.Camera3rdIsRightShoulder())
15  {
16  m_fCameraLRShoulder = 1.0;
17  }
18  else
19  {
20  m_fCameraLRShoulder = -1.0;
21  }
22 
23  m_fCameraLRShoulderVel[0] = 0.0;
24  m_CurrentCameraRoll = 0.0;
26  m_fLeanDistance = 0.3;
28  }
29 
30 
31  //
32  override void OnActivate(DayZPlayerCamera pPrevCamera, DayZPlayerCameraResult pPrevCameraResult)
33  {
34  super.OnActivate(pPrevCamera, pPrevCameraResult);
35 
36  if (pPrevCamera)
37  {
38  vector baseAngles = pPrevCamera.GetBaseAngles();
39  m_fUpDownAngle = baseAngles[0];
40  m_fLeftRightAngle = baseAngles[1];
41 
42  vector addAngles = pPrevCamera.GetAdditiveAngles();
43  m_fUpDownAngleAdd = addAngles[0];
44  m_fLeftRightAngleAdd = addAngles[1];
45  }
46  }
47 
48  //
49  override void OnUpdate(float pDt, out DayZPlayerCameraResult pOutResult)
50  {
51  m_pPlayer.GetMovementState(m_MovementState);
52 
56 
58 
59  // update l/r offsets and set it as
60  if (m_pInput.Camera3rdIsRightShoulder())
61  {
62  m_fCameraLRShoulder = Math.SmoothCD(m_fCameraLRShoulder, 1.0, m_fCameraLRShoulderVel, 0.14, 1000, pDt);
63  }
64  else
65  {
66  m_fCameraLRShoulder = Math.SmoothCD(m_fCameraLRShoulder, -1.0, m_fCameraLRShoulderVel, 0.14, 1000, pDt);
67  }
68 
69  float shoulderDist = m_fCameraLRShoulder * m_fShoulderWidth + m_MovementState.m_fLeaning * m_fLeanDistance;
70 
72  Math3D.YawPitchRollMatrix(GetCurrentOrientation(), pOutResult.m_CameraTM);
73 
75  if (m_iBoneIndex != -1)
76  {
77  pOutResult.m_CameraTM[3] = m_pPlayer.GetBonePositionMS(m_iBoneIndex);
78  }
79  else
80  {
81  pOutResult.m_CameraTM[3] = "0 0 0";
82  }
83 
85  vector msOffset = m_CameraOffsetMS;
86  vector lsOffset = m_CameraOffsetLS;
87 
88  if (m_bShoulderInLS)
89  {
90  lsOffset[0] = lsOffset[0] + shoulderDist;
91  }
92  else
93  {
94  msOffset[0] = msOffset[0] + shoulderDist;
95  }
96 
97  // ls offset + ms offset + shoulder width
98  pOutResult.m_CameraTM[3] = pOutResult.m_CameraTM[3] + pOutResult.m_CameraTM[0] * lsOffset[0] + pOutResult.m_CameraTM[1] * lsOffset[1] + pOutResult.m_CameraTM[2] * lsOffset[2] + msOffset;
99 
101  pOutResult.m_fDistance = m_fDistance;
102  pOutResult.m_fUseHeading = 1.0;
103  pOutResult.m_fInsideCamera = 0.0;
104  pOutResult.m_fPredictCollisionRadius = m_fPredictCollisionRadius;
105 
107  StdFovUpdate(pDt, pOutResult);
109  }
110 
111  override vector GetBaseAngles()
112  {
113  vector a;
114  a[0] = m_fUpDownAngle;
115  a[1] = m_fLeftRightAngle;
116  a[2] = 0;
117  return a;
118  }
119 
120  override vector GetAdditiveAngles()
121  {
122  vector a;
123  a[0] = m_fUpDownAngleAdd;
124  a[1] = m_fLeftRightAngleAdd;
125  a[2] = 0;
126  return a;
127  }
128 
129  override string GetCameraName()
130  {
131  return "DayZPlayerCamera3rdPerson";
132  }
133 
135  protected int m_iBoneIndex = -1;
138  protected float m_fDistance;
139  protected float m_fShoulderWidth;
140  protected bool m_bShoulderInLS;
141  protected float m_fRoll;
142  protected float m_fLeanDistance;
143 
144 
146  protected float m_fUpDownAngle;
147  protected float m_fUpDownAngleAdd;
148  protected float m_fLeftRightAngle;
149  protected float m_fLeftRightAngleAdd;
150 
152  protected float m_fCameraLRShoulder; // -1..1 shoulderness :)
153  protected float m_fCameraLRShoulderVel[1]; // 0
154 
156  protected float m_fPredictCollisionRadius;
157 
160 }
161 
162 
163 
164 
165 // *************************************************************************************
166 // ! DayZPlayerCamera3rdPersonErc - 3rd person erected
167 // *************************************************************************************
169 {
171  {
172  //Print("new camera: DayZPlayerCamera3rdPersonErc");
173 
174  m_fDistance = 1.6;
175  m_CameraOffsetMS = "0.0 1.4 0.0";
176  m_CameraOffsetLS = "0.0 0.3 0.0";
177  m_fShoulderWidth = 0.3;
179  }
180 }
181 
182 
183 // *************************************************************************************
184 // ! DayZPlayerCamera3rdPersonJump - 3rd person jump
185 // *************************************************************************************
187 {
189  {
190  //Print("new camera: DayZPlayerCamera3rdPersonJump");
191 
193  m_fDelay = 0.15;
194  m_fDamping = 0.25;
195 
197  m_fJumpStartY = pPlayer.GetOrigin()[1];
198  m_fJumpOffset = 0;
199  m_fDelayTimer = 0;
200  }
201 
202  //
203  override void OnUpdate(float pDt, out DayZPlayerCameraResult pOutResult)
204  {
205  super.OnUpdate(pDt, pOutResult);
206 
207  float yPos = m_pPlayer.GetOrigin()[1];
208  float yDiff = yPos - m_fJumpStartY;
209  yDiff = Math.Clamp(yDiff, 0.0, 2.0);
210 
211  if( m_fDelayTimer < m_fDelay )
212  {
213  m_fDelayTimer += pDt;
214  m_fJumpOffset = yDiff;
215  }
216  else
217  {
218  m_fJumpOffset = Math.SmoothCD(m_fJumpOffset, -(m_fDamping * yDiff), m_jumpOffsetVelocity, 0.3, 1000, pDt);
219  }
220 
221  float newY = pOutResult.m_CameraTM[3][1] - m_fJumpOffset;
222  pOutResult.m_CameraTM[3][1] = newY;
223  }
224 
226  float m_fDelay;
227  float m_fDamping;
228 
230  float m_fDelayTimer;
231  float m_fJumpStartY;
232  float m_fJumpOffset;
233  float m_jumpOffsetVelocity[1];
234 }
235 
236 // *************************************************************************************
237 // ! DayZPlayerCamera3rdPersonJump - 3rd person jump
238 // *************************************************************************************
240 {
242  {
243  //Print("new camera: DayZPlayerCamera3rdPersonClimb");
244  m_fDistance = 1.0;
245  m_CameraOffsetMS = "0.0 0.3 -0.6";
246  m_iBoneIndex = pPlayer.GetBoneIndexByName("Spine");
248  }
249 }
250 
251 // *************************************************************************************
252 // ! DayZPlayerCamera3rdPersonErc - 3rd person erected sprint
253 // *************************************************************************************
255 {
257  {
258  //Print("new camera: DayZPlayerCamera3rdPersonErcSpr");
259 
260  m_fDistance = 2.0;
261  m_CameraOffsetMS = "0.0 1.3 0.0";
262  m_CameraOffsetLS = "0.0 0.3 0.0";
263  m_fShoulderWidth = 0.15;
264 
265  m_iPelvisBone = pPlayer.GetBoneIndexByName("Pelvis");
266  if (m_iPelvisBone == -1)
267  {
268  Print("DayZPlayerCamera3rdPersonErcSpr: hips bone not found");
269  }
270 
271  m_fTime = 0.0;
272  }
273 
274 
275 
276  //
277  override void OnUpdate(float pDt, out DayZPlayerCameraResult pOutResult)
278  {
279  m_fTime += pDt * 5;
280 
281  vector tm[4];
282 
283  m_pPlayer.GetBoneTransformLS(m_iPelvisBone, tm);
285  float xShift = tm[1][0];
286  m_CurrentCameraRoll = xShift * 3.0; // 3 is just made up value i like :)
287 
288  // m_CurrentCameraRoll = (sin(1.5 * m_fTime)); // + 0.3 * sin(3.6 * m_fTime) + 0.2 * sin(0.7 * m_fTime)) / 1.3 * 3;
289 
291  super.OnUpdate(pDt, pOutResult);
292 
293  //pOutResult.m_fFovMultiplier = 1.2;
294  }
295 
296 
297  protected int m_iPelvisBone;
298  protected float m_fTime;
299 
300 }
301 
302 
303 // *************************************************************************************
304 // ! DayZPlayerCamera3rdPersonErcRaised - 3rd person erected raised
305 // *************************************************************************************
307 {
309  {
310  //Print("new camera: DayZPlayerCamera3rdPersonErcRaised");
312 
313  if ( pPlayer.GetCurrentPerItemCameraUD () == DayZPlayerCameras.PERITEMUD_EMPTYHANDED )
314  {
315  // no item in hands
316  m_fDistance = 1.2;
317  m_fShoulderWidth = 0.4;
318  m_CameraOffsetMS = "0.0 1.3 0.2";
319  m_CameraOffsetLS = "0.0 0.3 0.0";
320 
321  }
322  else if ( pPlayer.GetCurrentPerItemCameraUD () == DayZPlayerCameras.PERITEMUD_TWOHANDED )
323  {
324  // two handed
325  m_fDistance = 1.2;
326  m_fShoulderWidth = 0.4;
327  m_CameraOffsetMS = "0.0 1.3 0.2";
328  m_CameraOffsetLS = "0.0 0.3 0.0";
329  }
330  else if ( pPlayer.GetCurrentPerItemCameraUD () == DayZPlayerCameras.PERITEMUD_ONEHANDED )
331  {
332  // one handed
333  m_fDistance = 1.2;
334  m_fShoulderWidth = 0.4;
335  m_CameraOffsetMS = "0.0 1.3 0.2";
336  m_CameraOffsetLS = "0.0 0.3 0.0";
337  }
338  else
339  {
340  // weapons in hands
341  m_fDistance = 0.8;
342  m_CameraOffsetMS = "0.0 1.3 0.2";
343  m_CameraOffsetLS = "0.0 0.3 0.0";
344  m_fShoulderWidth = 0.5;
345  }
346  }
347 
348  override bool IsCamera3rdRaised()
349  {
350  return true;
351  }
352 }
353 
354 
355 // *************************************************************************************
356 // ! DayZPlayerCamera3rdPersonErcRaised - 3rd person erected raised
357 // *************************************************************************************
358 class DayZPlayerCamera3rdPersonErcRaisedMelee extends DayZPlayerCamera3rdPersonErcRaised
359 {
361  {
363  pInput.Override3rdIsRightShoulder(HumanInputControllerOverrideType.ENABLED, pInput.Camera3rdIsRightShoulder());
364  }
365 }
366 
367 
368 // *************************************************************************************
369 // ! DayZPlayerCamera3rdPersonCrouch - 3rd person crouch
370 // *************************************************************************************
372 {
373  static const float CONST_CAMERAMOVEMENTHEIGH = 0.4; // 0 idle, 0.15 walk 0.3 run/sprint
374 
376  {
377  //Print("new camera: DayZPlayerCamera3rdPersonCrouch");
378 
379  m_fDistance = 1.4;
380  m_CameraOffsetMS = "0.0 0.7 0.1";
381  m_CameraOffsetLS = "0.0 0.3 0.0";
382  m_fShoulderWidth = 0.3;
383  }
384 
385  //
386  override void OnUpdate(float pDt, out DayZPlayerCameraResult pOutResult)
387  {
388  m_pPlayer.GetMovementState(m_MovementState);
389 
391  float movement = (Limit(m_MovementState.m_iMovement, 1, 3) - 1.0) * 0.5;
392  movement *= CONST_CAMERAMOVEMENTHEIGH;
393  m_fCameraHeight = Math.SmoothCD(m_fCameraHeight, movement, m_fCameraHeightVel, 0.2, 1000, pDt);
394  m_CameraOffsetMS[1] = 0.7 + m_fCameraHeight;
395 
397  super.OnUpdate(pDt, pOutResult);
398  }
399 
400  protected float m_fCameraHeight; // -1..1 shoulderness :)
401  protected float m_fCameraHeightVel[1]; // 0
402 }
403 
404 
405 // *************************************************************************************
406 // ! DayZPlayerCamera3rdPersonCrouchRaised- 3rd person crouch raised
407 // *************************************************************************************
408 class DayZPlayerCamera3rdPersonCrouchRaised extends DayZPlayerCamera3rdPersonCrouch
409 {
410  void DayZPlayerCamera3rdPersonCrouchRaised(DayZPlayer pPlayer, HumanInputController pInput)
411  {
412  //Print("new camera: DayZPlayerCamera3rdPersonCrouchRaised");
413 
414  m_fDistance = 0.8;
415  m_CameraOffsetMS = "0.0 0.8 0.1"; // being overwritten by m_CameraOffsetMS[1] from DayZPlayerCamera3rdPersonCrouch
416  m_CameraOffsetLS = "0.0 0.3 0.0";
417  m_fShoulderWidth = 0.5;
418  }
419 
420  override bool IsCamera3rdRaised()
421  {
422  return true;
423  }
424 }
425 
426 
427 // *************************************************************************************
428 // ! DayZPlayerCamera3rdPersonProneRaised - 3rd person prone raised
429 // *************************************************************************************
431 {
432  protected vector m_BaseOffset
433  protected float m_BaseOffsetVelX[1], m_BaseOffsetVelY[1], m_BaseOffsetVelZ[1];
434  protected float m_LookAtLRAngle;
435 
436  float UpdateLRAngleLookAt(float pMin, float pMax, float pDt)
437  {
439  if (m_pInput.CameraIsFreeLook() || m_bForceFreeLook)
440  {
441  m_LookAtLRAngle += m_pInput.GetAimChange()[0] * Math.RAD2DEG;
442  m_LookAtLRAngle = Limit(m_LookAtLRAngle, pMin, pMax);
443 
444  m_fLRAngleVel[0] = 0; // reset filter
445  }
446  else
447  {
448  // smooth value back to 0
449  m_LookAtLRAngle = Math.SmoothCD(m_LookAtLRAngle, 0, m_fLRAngleVel, 0.14, 1000, pDt);
450  // m_fLeftRightAngle = 0.9 * (1.0 - pDt);
451  }
452 
453  return m_LookAtLRAngle;
454  }
455 
456  override void OnActivate(DayZPlayerCamera pPrevCamera, DayZPlayerCameraResult pPrevCameraResult)
457  {
458  super.OnActivate(pPrevCamera, pPrevCameraResult);
459 
460  if (m_iBoneIndex != -1)
461  {
462  m_BaseOffset = m_pPlayer.GetBonePositionMS(m_iBoneIndex);
463  }
464  else
465  {
466  m_BaseOffset = "0 0 0";
467  }
468  }
469 
470 
471  //
472  override void OnUpdate(float pDt, out DayZPlayerCameraResult pOutResult)
473  {
476 
477  float orientYaw = m_pPlayer.GetOrientation()[0];
478  float headYaw = m_pInput.GetHeadingAngle() * Math.RAD2DEG;
479  m_CurrentCameraYaw = -fixAngle_180_180(orientYaw + headYaw);
480 
481  // Print("OY: " + orientYaw.ToString() + " HY: " + headYaw.ToString());
482 
483  // update l/r offsets and set it as
484 
486 
487  if (m_pInput.Camera3rdIsRightShoulder())
488  {
489  m_fCameraLRShoulder = Math.SmoothCD(m_fCameraLRShoulder, 1.0, m_fCameraLRShoulderVel, 0.14, 1000, pDt);
490  }
491  else
492  {
493  m_fCameraLRShoulder = Math.SmoothCD(m_fCameraLRShoulder, -1.0, m_fCameraLRShoulderVel, 0.14, 1000, pDt);
494  }
495 
496  float shoulderDist = m_fCameraLRShoulder * m_fShoulderWidth;
497 
499  Math3D.YawPitchRollMatrix(GetCurrentOrientation(), pOutResult.m_CameraTM);
500 
502  if (m_iBoneIndex != -1)
503  {
504  vector bonePos = m_pPlayer.GetBonePositionMS(m_iBoneIndex);
505  m_BaseOffset[0] = Math.SmoothCD(m_BaseOffset[0], bonePos[0], m_BaseOffsetVelX, 0.14, 1000, pDt);
506  m_BaseOffset[1] = Math.SmoothCD(m_BaseOffset[1], bonePos[1], m_BaseOffsetVelY, 0.14, 1000, pDt);
507  m_BaseOffset[2] = Math.SmoothCD(m_BaseOffset[2], bonePos[2], m_BaseOffsetVelZ, 0.14, 1000, pDt);
508  }
509 
511  vector msOffset = m_CameraOffsetMS;
512  vector lsOffset = m_CameraOffsetLS;
513 
514  lsOffset[0] = lsOffset[0] + shoulderDist;
515 
516  // ls offset + ms offset + shoulder width
517  pOutResult.m_CameraTM[3] = m_BaseOffset + pOutResult.m_CameraTM[0] * lsOffset[0] + pOutResult.m_CameraTM[1] * lsOffset[1] + pOutResult.m_CameraTM[2] * lsOffset[2] + msOffset;
518 
519  m_CurrentCameraYaw = UpdateLRAngleLookAt(-180, 180, pDt);
520  Math3D.YawPitchRollMatrix(GetCurrentOrientation(), pOutResult.m_CameraTM);
521 
523  pOutResult.m_fDistance = m_fDistance;
524  pOutResult.m_fUseHeading = 1.0;
525  pOutResult.m_fInsideCamera = 0.0;
526  pOutResult.m_fPositionModelSpace = 1.0;
527  pOutResult.m_bUpdateWhenBlendOut = false;
528 
530  StdFovUpdate(pDt, pOutResult);
532  }
533 }
534 
535 // *************************************************************************************
536 // ! DayZPlayerCamera3rdPersonProne - 3rd person prone
537 // *************************************************************************************
539 {
541  {
542  //Print("new camera: DayZPlayerCamera3rdPersonProne");
543  m_iBoneIndex = pPlayer.GetBoneIndexByName ("Camera3rd_Helper");
544  m_fDistance = 1.0;
545  m_CameraOffsetMS = "0.0 0.4 0.0";
546  m_CameraOffsetLS = "0.0 0.2 0.0";
547  m_fShoulderWidth = 0.5;
548  }
549 
550 }
551 
552 // *************************************************************************************
553 // ! DayZPlayerCamera3rdPersonProneRaised - 3rd person prone raised
554 // *************************************************************************************
556 {
558  {
559  //Print("new camera: DayZPlayerCamera3rdPersonProneRaised");
560  m_iBoneIndex = pPlayer.GetBoneIndexByName ("Camera3rd_Helper");
561  m_fDistance = 1.0;
562  m_CameraOffsetMS = "0.0 0.4 0.0";
563  m_CameraOffsetLS = "0.0 0.2 0.0";
564  m_fShoulderWidth = 0.5;
565  }
566 
567  override bool IsCamera3rdRaised()
568  {
569  return true;
570  }
571 }
OnUpdate
override void OnUpdate(float pDt, out DayZPlayerCameraResult pOutResult)
Definition: dayzplayercamera3rdperson.c:45
m_bForceFreeLook
protected bool m_bForceFreeLook
Definition: dayzplayercamera_base.c:554
m_fDelayTimer
float m_fDelayTimer
runtime values
Definition: dayzplayercamera3rdperson.c:44
DayZPlayerCamera3rdPersonClimb
class DayZPlayerCamera3rdPersonJump extends DayZPlayerCamera3rdPersonErc DayZPlayerCamera3rdPersonClimb(DayZPlayer pPlayer, HumanInputController pInput)
Definition: dayzplayercamera3rdperson.c:241
m_fLeftRightAngle
protected float m_fLeftRightAngle
left right angle in rad (in freelook only)
Definition: dayzplayercamera3rdperson.c:144
m_fDelay
float m_fDelay
runtime config
Definition: dayzplayercamera3rdperson.c:40
CONST_UD_MIN
class DayZPlayerCamera1stPersonVehicle extends DayZPlayerCamera1stPerson CONST_UD_MIN
down limit
DayZPlayerCamera3rdPersonProneBase
Definition: dayzplayercamera3rdperson.c:538
m_jumpOffsetVelocity
float m_jumpOffsetVelocity[1]
Definition: dayzplayercamera3rdperson.c:47
UpdateUDAngleUnlocked
float UpdateUDAngleUnlocked(out float pAngle, out float pAngleAdd, float pMin, float pMax, float pDt)
Definition: dayzplayercamera_base.c:129
DayZPlayerCamera3rdPersonErcRaised
Definition: dayzplayercamera3rdperson.c:358
ProcessCameraShake
void ProcessCameraShake(float delta, out float leftRight, out float upDown)
Definition: dayzplayercamera_base.c:108
DayZPlayerCamera
class DayZPlayerCameraResult DayZPlayerCamera(DayZPlayer pPlayer, HumanInputController pInput)
Definition: dayzplayer.c:56
m_CameraOffsetLS
protected vector m_CameraOffsetLS
local space offset
Definition: dayzplayercamera3rdperson.c:133
GetCameraName
override string GetCameraName()
Definition: dayzplayercamera3rdperson.c:125
m_fTime
protected float m_fTime
Definition: dayzplayercamera3rdperson.c:44
m_fCameraHeightVel
protected float m_fCameraHeightVel[1]
Definition: dayzplayercamera3rdperson.c:401
m_fCameraLRShoulder
protected float m_fCameraLRShoulder
shoulder offsets
Definition: dayzplayercamera3rdperson.c:148
Print
proto void Print(void var)
Prints content of variable to console/log.
DayZPlayerCamera3rdPersonJump
void DayZPlayerCamera3rdPersonJump(DayZPlayer pPlayer, HumanInputController pInput)
Definition: dayzplayercamera3rdperson.c:2
UpdateLRAngleLookAt
float UpdateLRAngleLookAt(float pMin, float pMax, float pDt)
Definition: dayzplayercamera3rdperson.c:436
UpdateLRAngleUnlocked
float UpdateLRAngleUnlocked(out float pAngle, out float pAngleAdd, float pMin, float pMax, float pDt)
Definition: dayzplayercamera_base.c:170
HandleShoulderCameraOverride
void HandleShoulderCameraOverride(HumanInputController pInput)
Definition: dayzplayercamera_base.c:102
DayZPlayer
Definition: dayzplayerimplement.c:72
DayZPlayerCameras
Definition: dayzplayercameras.c:1
Limit
float Limit(float pV, float pMin, float pMax)
limit function
Definition: dayzplayercamera_base.c:2
m_fDistance
protected float m_fDistance
distance from start
Definition: dayzplayercamera3rdperson.c:134
HumanMovementState
Definition: human.c:1125
m_MovementState
ref HumanMovementState m_MovementState
movement state
Definition: dayzplayercamera3rdperson.c:155
CONST_CAMERAMOVEMENTHEIGH
class DayZPlayerCamera3rdPersonErcRaisedMelee extends DayZPlayerCamera3rdPersonErcRaised CONST_CAMERAMOVEMENTHEIGH
m_pInput
protected HumanInputController m_pInput
human input
Definition: dayzplayer.c:136
GetAdditiveAngles
override vector GetAdditiveAngles()
Definition: dayzplayercamera3rdperson.c:116
DayZPlayerCamera3rdPersonProne
void DayZPlayerCamera3rdPersonProne(DayZPlayer pPlayer, HumanInputController pInput)
Definition: dayzplayercamera3rdperson.c:473
m_fUpDownAngle
protected float m_fUpDownAngle
runtime values
Definition: dayzplayercamera3rdperson.c:142
m_WeaponSwayModifier
protected float m_WeaponSwayModifier
Definition: dayzplayercamera_base.c:555
PlayerBase
Definition: playerbaseclient.c:1
m_pPlayer
protected DayZPlayer m_pPlayer
data
Definition: dayzplayer.c:135
vector
Definition: enconvert.c:105
m_CurrentCameraPitch
protected float m_CurrentCameraPitch
Definition: dayzplayercamera_base.c:559
m_fLRAngleVel
protected float m_fLRAngleVel[1]
Definition: dayzplayercamera_base.c:550
DayZPlayerCamera3rdPersonCrouch
Definition: dayzplayercamera3rdperson.c:408
m_fJumpStartY
float m_fJumpStartY
Definition: dayzplayercamera3rdperson.c:45
InitCameraOnPlayer
void InitCameraOnPlayer(bool force=false)
Definition: dayzplayercamera_base.c:541
DayZPlayerCameraResult
Definition: dayzplayer.c:11
m_fCameraLRShoulderVel
protected float m_fCameraLRShoulderVel[1]
Definition: dayzplayercamera3rdperson.c:149
DayZPlayerCamera3rdPersonCrouch
void DayZPlayerCamera3rdPersonCrouch(DayZPlayer pPlayer, HumanInputController pInput)
Definition: dayzplayercamera3rdperson.c:375
m_fPredictCollisionRadius
protected float m_fPredictCollisionRadius
collision prediction
Definition: dayzplayercamera3rdperson.c:152
DayZPlayerCamera3rdPersonErc
class DayZPlayerCamera3rdPerson extends DayZPlayerCameraBase DayZPlayerCamera3rdPersonErc(DayZPlayer pPlayer, HumanInputController pInput)
Definition: dayzplayercamera3rdperson.c:170
DayZPlayerCamera3rdPersonProneRaised
class DayZPlayerCamera3rdPersonProne extends DayZPlayerCamera3rdPersonProneBase DayZPlayerCamera3rdPersonProneRaised(DayZPlayer pPlayer, HumanInputController pInput)
Definition: dayzplayercamera3rdperson.c:557
m_fJumpOffset
float m_fJumpOffset
Definition: dayzplayercamera3rdperson.c:46
m_fRoll
protected float m_fRoll
camera roll (deprecated)
Definition: dayzplayercamera3rdperson.c:137
m_fDamping
float m_fDamping
Definition: dayzplayercamera3rdperson.c:41
HumanInputController
Definition: human.c:17
m_fUpDownAngleAdd
protected float m_fUpDownAngleAdd
up down angle in rad
Definition: dayzplayercamera3rdperson.c:143
m_BaseOffsetVelZ
class DayZPlayerCamera3rdPersonCrouchRaised extends DayZPlayerCamera3rdPersonCrouch m_BaseOffsetVelZ[1]
m_CameraOffsetMS
protected vector m_CameraOffsetMS
model space offset
Definition: dayzplayercamera3rdperson.c:132
DayZPlayerCamera3rdPerson
void DayZPlayerCamera3rdPerson(DayZPlayer pPlayer, HumanInputController pInput)
Definition: dayzplayercamera3rdperson.c:8
DayZPlayerCameraBase
this is main camera class
Definition: dayzplayercamera1stperson.c:4
m_BaseOffsetVelX
class DayZPlayerCamera3rdPersonCrouchRaised extends DayZPlayerCamera3rdPersonCrouch m_BaseOffsetVelX[1]
m_fCameraHeight
protected float m_fCameraHeight
Definition: dayzplayercamera3rdperson.c:400
DayZPlayerCamera3rdPersonErcRaised
class DayZPlayerCamera3rdPersonErcSpr extends DayZPlayerCamera3rdPersonErc DayZPlayerCamera3rdPersonErcRaised(DayZPlayer pPlayer, HumanInputController pInput)
Definition: dayzplayercamera3rdperson.c:308
m_BaseOffsetVelY
class DayZPlayerCamera3rdPersonCrouchRaised extends DayZPlayerCamera3rdPersonCrouch m_BaseOffsetVelY[1]
m_iPelvisBone
protected int m_iPelvisBone
Definition: dayzplayercamera3rdperson.c:43
m_CurrentCameraYaw
protected float m_CurrentCameraYaw
Definition: dayzplayercamera_base.c:558
m_LookAtLRAngle
protected float m_LookAtLRAngle
Definition: dayzplayercamera3rdperson.c:434
DayZPlayerCamera3rdPersonErcSpr
void DayZPlayerCamera3rdPersonErcSpr(DayZPlayer pPlayer, HumanInputController pInput)
Definition: dayzplayercamera3rdperson.c:2
OnActivate
override void OnActivate(DayZPlayerCamera pPrevCamera, DayZPlayerCameraResult pPrevCameraResult)
Definition: dayzplayercamera3rdperson.c:28
fixAngle_180_180
float fixAngle_180_180(float pAngle)
Definition: dayzplayercamera_base.c:36
m_fShoulderWidth
protected float m_fShoulderWidth
shoulder camera widths
Definition: dayzplayercamera3rdperson.c:135
m_fLeanDistance
protected float m_fLeanDistance
shift on leaning
Definition: dayzplayercamera3rdperson.c:138
DayZPlayerCamera3rdPersonErc
Definition: dayzplayercamera3rdperson.c:186
StdFovUpdate
void StdFovUpdate(float pDt, out DayZPlayerCameraResult pOutResult)
Definition: dayzplayercamera_base.c:295
m_bShoulderInLS
protected bool m_bShoulderInLS
true - shoulder is in local space
Definition: dayzplayercamera3rdperson.c:136
Math
Definition: enmath.c:6
GetCurrentOrientation
vector GetCurrentOrientation()
Definition: dayzplayer.c:112
IsCamera3rdRaised
override bool IsCamera3rdRaised()
Definition: dayzplayercamera3rdperson.c:348
m_CurrentCameraRoll
protected float m_CurrentCameraRoll
Definition: dayzplayercamera_base.c:560
m_fLeftRightAngleAdd
protected float m_fLeftRightAngleAdd
left right angle in rad (in freelook only)
Definition: dayzplayercamera3rdperson.c:145
Math3D
Definition: enmath3d.c:27
GetBaseAngles
override vector GetBaseAngles()
Definition: dayzplayercamera3rdperson.c:107
m_iBoneIndex
protected int m_iBoneIndex
runtime config
Definition: dayzplayercamera3rdperson.c:131
HumanInputControllerOverrideType
HumanInputControllerOverrideType
Definition: human.c:7
UpdateCameraNV
void UpdateCameraNV(PlayerBase player)
Definition: dayzplayercamera_base.c:401