8 super.OnUpdate(pDt, pOutResult);
10 pOutResult.m_fUseHeading = 0.0;
11 pOutResult.m_bUpdateEveryFrame =
g_Game.IsPhysicsExtrapolationEnabled();
48 m_fDistance = transport.GetTransportCameraDistance();
58 vector baseAngles = pPrevCamera.GetBaseAngles();
62 vector addAngles = pPrevCamera.GetAdditiveAngles();
92 vector playerTransformWS[4];
93 m_pPlayer.GetTransform(playerTransformWS);
97 pOutResult.m_CollisionIgnoreEntity = vehicle;
119 rotWS[2] =
Math.
Clamp(rotWS[2], -maxRoll, maxRoll) / maxRoll;
120 rotWS[2] = rotWS[2] * rotWS[2] * rotWS[2];
121 rotWS[2] = rotWS[2] * maxRoll;
131 posDiffLS = posDiffLS + posDiffWS.
InvMultiply3(playerTransformWS);
134 rotDiffLS = rotDiffLS + rotDiffWS.
InvMultiply3(playerTransformWS);
136 vector tempRot1 = rotDiffLS;
137 rotDiffLS[0] = tempRot1[1];
138 rotDiffLS[1] = tempRot1[2];
139 rotDiffLS[2] = tempRot1[0];
141 rotWS[0] = rotWS[0] + rotDiffLS[0];
142 rotWS[1] = rotWS[1] + rotDiffLS[1];
143 rotWS[2] = rotWS[2] + rotDiffLS[2];
189 pOutResult.m_fDistance = distance;
190 pOutResult.m_fUseHeading = 0.0;
191 pOutResult.m_fInsideCamera = 0.0;
192 pOutResult.m_fIgnoreParentRoll = 1.0;
193 pOutResult.m_fIgnoreParentPitch = 1.0;
195 pOutResult.m_bUpdateEveryFrame =
g_Game.IsPhysicsExtrapolationEnabled();
199 super.OnUpdate(pDt, pOutResult);
override void OnUpdate(float pDt, out DayZPlayerCameraResult pOutResult)
this is main camera class
override vector GetAdditiveAngles()
override vector GetBaseAngles()
proto native Transport GetTransport()
Internal ancestor of all Entity implementations.
Native class for boats - handles physics simulation.
proto vector InvMultiply3(vector mat[3])
Invert-transforms vector.
proto vector InvMultiply4(vector mat[4])
Invert-transforms position.
float m_fDistance
camera distance (external cameras only)
class DayZPlayerCameraResult DayZPlayerCamera(DayZPlayer pPlayer, HumanInputController pInput)
vector GetCurrentOrientation()
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
static const float CONST_LR_MAX
up limit
static const float CONST_UD_MIN
down limit
vector m_CameraOffsetMS
model space offset
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)
float m_CurrentCameraRoll
vector m_LagOffsetOrientation
void DayZPlayerCamera3rdPersonVehicle(DayZPlayer pPlayer, HumanInputController pInput)
const float CONST_ANGULAR_LAG_ROLL_STRENGTH
const float CONST_ANGULAR_VELOCITY_STRENGTH
float m_fLagOffsetVelocityYaw[1]
const float CONST_ANGULAR_LAG_PITCH_STRENGTH
vector m_LagOffsetPosition
lag offsets
float m_fLagOffsetVelocityPitch[1]
float m_fLagOffsetVelocityY[1]
float m_fLagOffsetVelocityRoll[1]
float m_fLagOffsetVelocityX[1]
const float CONST_ANGULAR_LAG_YAW_STRENGTH
Transport m_Transport
cache
float m_fLagOffsetVelocityZ[1]
const float CONST_LINEAR_VELOCITY_STRENGTH
proto native external vector GetOrigin()
Returns origin of Entity.
static proto vector MatrixToAngles(vector mat[3])
Returns angles of rotation matrix.
static proto void MatrixInvMultiply3(vector mat0[3], vector mat1[3], out vector res[3])
Invert-transforms rotation matrix.
static proto void YawPitchRollMatrix(vector ang, out vector mat[3])
Creates rotation matrix from angles.
static float SmoothCDPI2PI(float val, float target, inout float velocity[], float smoothTime, float maxVelocity, float dt)
static proto float Clamp(float value, float min, float max)
Clamps 'value' to 'min' if it is lower than 'min', or to 'max' if it is higher than 'max'.
static proto float InverseLerp(float a, float b, float value)
Calculates the linear value that produces the interpolant value within the range [a,...
static proto float SmoothCD(float val, float target, inout float velocity[], float smoothTime, float maxVelocity, float dt)
Does the CD smoothing function - easy in | easy out / S shaped smoothing.
static proto float AbsFloat(float f)
Returns absolute value.
static const float RAD2DEG
static const float DEG2RAD
proto native vector GetVelocity(notnull IEntity ent)
Returns linear velocity.
proto vector dBodyGetAngularVelocity(notnull IEntity body)
Gets angular velocity for a rigidbody.