188{
191
194
195
197 {
200 {
201 Print(
"DayZPlayerCamera1stPerson: main bone not found");
202 }
203
205 }
206
207
208
210 {
211 super.OnActivate(pPrevCamera, pPrevCameraResult);
212
213 if (pPrevCamera)
214 {
215 vector baseAngles = pPrevCamera.GetBaseAngles();
218
219 vector addAngles = pPrevCamera.GetAdditiveAngles();
222 }
223 }
224
225
227 {
231
235
237 pOutResult.m_iDirectBoneMode = 1;
238 pOutResult.m_fUseHeading = 1.0;
239 pOutResult.m_fInsideCamera = 1.0;
240
241 pOutResult.m_fNearPlane = 0.04;
242
244
248 }
249
251 {
255 a[2] = 0;
256 return a;
257 }
258
260 {
264 a[2] = 0;
265 return a;
266 }
267
269 {
270 return "DayZPlayerCamera1stPerson";
271 }
272
275
280}
281
282
283
284
286{
288 {
290 }
291
293 {
294 super.OnUpdate(pDt, pOutResult);
295
297 pOutResult.m_iDirectBoneMode = 4;
298 pOutResult.m_fUseHeading = 0.0;
299
300 vector rot;
301 rot[0] = 0;
302 rot[1] = 90;
303 rot[2] = 0;
304
305 Math3D.YawPitchRollMatrix(rot, pOutResult.m_CameraTM);
306 }
307}
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.