- Code: Select all
if ( pOwner->m_nButtons & IN_FORWARD )
{
QAngle viewPunch;
viewPunch.x = 3.0f;
viewPunch.y = 0.0f;
viewPunch.z = 0.0f;
//Add it to the view punch
ViewPunch( viewPunch );
}
and variations of it to move the view based on movement direction.
Player's view resets. Every frame or so it slaps between rotated to the max distance and rotated to the normal view.
I want the view to rotate smoothly (not snap) to the position and then smoothly come back when you release the key.