smoothen crosshairs when attached to bone

removed bobbing and jittering while the crosshair origin is set to use a joint on the player model (pm_crosshairorigin 1). Was very noticeable while looking at steps.
This commit is contained in:
revility 2018-10-29 20:47:57 -04:00 committed by GitHub
parent d903e48819
commit 83a1d2a83d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -8924,7 +8924,7 @@ void idPlayer::CalculateFirstPersonView( void ) {
jointHandle_t joint = animator.GetJointHandle( "SHOTGUN_ATTACHER" ); //now set to an actual joint on the player model Revility 2018. This moves the line to draw the crosshair closer to the weapon.
animator.GetJointTransform( joint, gameLocal.time, origin, axis );
firstPersonViewOrigin = ( origin + modelOffset ) * ( viewAxis * physicsObj.GetGravityAxis() ) + physicsObj.GetOrigin() + viewBob;
firstPersonViewOrigin = ( origin + modelOffset ) * ( viewAxis * physicsObj.GetGravityAxis() ) + physicsObj.GetOrigin(); // + viewBob; Rev 2018
firstPersonViewAxis = renderView->viewaxis; //changed to the axis of the camera and not the bone. Revility 2018
} else {
// offset for local bobbing and kicks