1565 {
1566
1567
1568
1569 vector resTM[4];
1572 resTM[2] = direction;
1573 resTM[1] = resTM[2] * resTM[0];
1574 resTM[3] = start;
1575
1576
1578 vector rotTM[3];
1581 Math3D.YawPitchRollMatrix(
Vector(xAimHandsOffset , yAimHandsOffset, leanAngle), rotTM );
1582 Math3D.MatrixMultiply3(resTM, rotTM, resTM);
1583
1584
1585 #ifndef SERVER
1586 #ifdef DIAG_DEVELOPER
1587 PluginDiagMenuClient.GetWeaponLiftDiag().Data().SetTransform(resTM);
1588 #endif
1589 #endif
1590
1591
1594
1596 float ud11 = Math.Clamp((ud01 * 2) - 1, -1, 1);
1598 float lr11 = Math.Clamp((lr01 * 2) - 1, -1, 1);
1599
1600 #ifndef SERVER
1601 #ifdef DIAG_DEVELOPER
1602 PluginDiagMenuClient.GetWeaponLiftDiag().Data().SetAimAngles(udAngle, lrAngle, ud11, lr11);
1603 #endif
1604 #endif
1605
1606
1609 vector offset = aimOffsets.Blend(lr11, ud11);
1610
1611
1613 {
1615 }
1616
1617
1618
1619
1621 offset += moveOffset;
1622
1623
1624
1626 {
1627 offset[2] = offset[2] + 0.05;
1628 }
1629
1631
1632
1634 }
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.