viewmodel offset / bugged after shooting

after you shoot the silenced pistol for example, the silencer of your viewmodel gets bugged away and i dont know why. this happens also with many other weapons.

before shooting or after reloading (reloading fixes the bug until you shoot again)

after shooting (silencer gets buggy)

what causes this and how can i fix this?

thank you in advance

  • edit -

how can i include pictures as clickable thumbnails?

Can you test this on a dev branch server? I believe this is fixed next update.

I will test it on a dev branch server but could you tell me what causes the bug even if the next update (maybe) fixes it as I am just trying to understand why this bug occurs.

This is an issue with the weapon’s animations. The angle of the gun is slightly different at the end of the firing animation, meaning the position/angle offsets that are made for the idle won’t work.

You’ll have to either make an aim offset for every animation or, force the weapon to reset to its idle animation after being fired/reloaded.

It’s actually not, the offset is done in Lua. The issue is a lot of unpredicted variables.

I’m pretty sure it’s the animations…

After opening up the model, it seems that shoot1, and all of the unsilienced shooting animations works fine, but shoot2 and shoot3 cause this to happen. I’m not sure how the TTT weapon base works, but if you can set the individual firing animations on a weapon, set the USP to only use shoot1 when unsilenced.

You just moved the camera in HLMV – the offset is applied in Lua here and here. Maybe the silencer is slightly clipped in the activity on the unrendered side of the weapon during the shooting activity, but your video was a bit vague and I wasn’t sure what you were trying to show. Either way, you can specify an individual activity for playing with

Entity:SendViewModelMatchingSequence instead of SendWeaponAnim.

So, I just got it fixed using

Entity:SendViewModelMatchingSequence to play the animation “shoot1_unsil” or “shoot1”. Now I got one more question / problem and I don’t want to create a new thread for that.

When I use

Entity:SendViewModelMatchingSequence to play an animation, the animation speed seems not to be affected by

Entity:SetPlaybackRate.

How can I fix that?

Thank’s in advance.

It should be. Make sure you set the playback afterward.

Glad that worked for you, as far as setting the playback speed, code_gs is right, make sure to set the playback afterwords.

Everything works perfectly now.

Thank you both very much!