
It is currently Fri May 31, 2024 6:15 am














player->ViewPunch( QAngle( xoffset, yoffset, 0));


if(IsSprinting())
{
Vector newoffset = GetViewOffset();
Vector lean,jump;
AngleVectors(EyeAngles(),NULL,&lean, &jump);
newoffset.x = lean.x * sin(gpGlobals->curtime * 10.0f) * 10.0f;
newoffset.y = lean.y * sin(gpGlobals->curtime * 10.0f) * 10.0f;
newoffset.z = (jump.z * cos(gpGlobals->curtime * 20.0f) * 5.0f) + VEC_VIEW.z;
SetViewOffset(newoffset);
}
else
{
SetViewOffset(VEC_VIEW);
}












fishshapedfish wrote:Thanks, If I did that I could even have the crosshair moving with reloads, idle animations and I could even use it with the fire animations and remove the default view offset recoil. On the other hand I would have to recompile all of the hl2 weapons and more so I'll try a different method. I understand that this weapon bob is completely scripted so if I could find this code I could use its values in the crosshair movement.

Users browsing this forum: No registered users