1571 {
1572
1573
1574
1575 vector resTM[4];
1578 resTM[2] = direction;
1579 resTM[1] = resTM[2] * resTM[0];
1580 resTM[3] = start;
1581
1582
1584 vector rotTM[3];
1587 Math3D.YawPitchRollMatrix(
Vector(xAimHandsOffset , yAimHandsOffset, leanAngle), rotTM );
1588 Math3D.MatrixMultiply3(resTM, rotTM, resTM);
1589
1590
1591 #ifndef SERVER
1592 #ifdef DIAG_DEVELOPER
1593 PluginDiagMenuClient.GetWeaponLiftDiag().Data().SetTransform(resTM);
1594 #endif
1595 #endif
1596
1597
1600
1602 float ud11 = Math.Clamp((ud01 * 2) - 1, -1, 1);
1604 float lr11 = Math.Clamp((lr01 * 2) - 1, -1, 1);
1605
1606 #ifndef SERVER
1607 #ifdef DIAG_DEVELOPER
1608 PluginDiagMenuClient.GetWeaponLiftDiag().Data().SetAimAngles(udAngle, lrAngle, ud11, lr11);
1609 #endif
1610 #endif
1611
1612
1615 vector offset = aimOffsets.Blend(lr11, ud11);
1616
1617
1619 {
1621 }
1622
1623
1624
1625
1627 offset += moveOffset;
1628
1629
1630
1632 {
1633 offset[2] = offset[2] + 0.05;
1634 }
1635
1637
1638
1640 }
class Blend2D< Class T > Blend2DVector
void DayZPlayerCamera1stPerson(DayZPlayer pPlayer, HumanInputController pInput)
proto native bool IsChangingStance()
returns true if character is changing stance
proto native float GetAimingHandsOffsetUD()
returns aiming hands up/down (y) offset angle
proto native float GetBaseAimingAngleLR()
returns base aiming angle LR - without sway/offsets/...
proto native float GetAimingHandsOffsetLR()
returns aiming hands left/right (x) offset angle
proto native float GetBaseAimingAngleUD()
returns base aiming angle UD - without sway/offsets/...
int m_iStanceIdx
current command's id
float m_fLeaning
current movement (0 idle, 1 walk, 2-run, 3-sprint), only if the command has a movement
vector GetApproximateMovementOffset(vector localVelocity, int characterStance, float lean, float ud11, float lr11)
float m_WeaponLiftCheckVerticalOffset
void GetApproximateAimOffsets(Blend2DVector dst, int characterStance)
proto vector Normalized()
return normalized vector (keeps orginal vector untouched)
proto vector Multiply4(vector mat[4])
Transforms position.
static vector RotateAroundZeroDeg(vector vec, vector axis, float angle)
Rotate a vector around 0,0,0 by an angle in degrees.
proto vector InvMultiply3(vector mat[3])
Invert-transforms vector.
proto native vector Vector(float x, float y, float z)
Vector constructor from components.