Left 4 Dead 2

Left 4 Dead 2

1,899 ratings
Viewmodel Sway (Motion)
5
2
3
3
5
4
2
3
3
3
   
Award
Favorite
Favorited
Unfavorite
Game Content: Weapons, Items, Miscellaneous, Models
Weapons: Melee, Throwable
File Size
Posted
Updated
26.213 MB
30 Dec, 2023 @ 9:26am
5 Jan, 2024 @ 4:18am
5 Change Notes ( view )

Subscribe to download
Viewmodel Sway (Motion)

Description
Short description:
This mod makes your viewmodel less static by adding sway via jigglebones for ALL vanilla firearms, melees, and items (meaning, it doesn't work with reanimations or remodels due to its nature). It also works online!

Full description:
Howdy, everyone! I reckon some of you might've seen a similar mod for Team Fortress 2 a while back (like, 8 years ago?) and wondered "why hasn't this been done for Left 4 Dead 2?" The answer is: inverse kinematics (a.k.a., IK chain), which TF2 didn't use.

For those that are unaware, inverse kinematics ensure that your character's arms stay properly connected to the weapon, preventing any madness when all the "blending/layering" magic happens (e.g., looking up/down, walking, reloading, all happening at the same time).

Obvious question, what do the inverse kinematics have to do with anything? Apparently, using the IK chain in the viewmodel's .qc causes jigglebones affected by it to be completely ignored upon compilation (a safety measure most likely)... If you couldn't understand a single word: the jigglebones that do their work to display our fake sway are not used in-game anymore, which renders the whole mod unusable. The only way to avoid this is by removing the IKs entirely, but that will break animation blending for the viewmodels. Quite a puzzling situation, isn't it?

What should do we do? After some pondering I came up with two possible solutions: disable fancy blending (it's like pre-TLS days all over again) or manually simplify each problematic animation to eliminate the need for the inverse kinematics. I opted for the latter approach, which wasn't an easy task, and here's the result.

Features:
– Natural, "physically-based" swaying for all viewmodels. Affects your flashlight too!
– Works on official and on local/dedicated servers.
– Jigglebones won't bug out no matter how hard you jerk your mouse around (thank L4D2's Sorse engine branch).
– Fully compatible with retextures and survivor mods. Not compatible with remodels and reanimations (since the jigglebone needs to be added per item/weapon. Sorry, not possible to do any other way as of now).

Notes:
– If a custom campaign has a custom melee weapon that uses existing original melee weapon animations (as $includemodel), it won't appear on your screen.
– Default view model FOV (51) is recommended.

We have the SOURCE FILES here![www.dropbox.com]You can use them however you like, just don't forget to provide proper credits where it's due.

Credits:
XENORT – decompiling/compiling, adding and setting up jigglebones, editing animations, adjusting .qc's
Valve/TLS Team/Turtle Rock Studios – models, original animation data

Report if you have any floating arms or some other scary stuff happening.
All in all, this mod was a wild journey to get done. Won't take your time any longer, hope you enjoy!

P.S.: not a single joke about beta yet???
P.P.S.: Oh, MAN! This is just like Terror-Strike Insurgency, amirite?
184 Comments
The LAMBDA player 18 Jul @ 9:11pm 
finally sway but like damn
nomad 28 Jun @ 8:47pm 
Can you please provide a guide to convert weapons to have sway?
Hикoлaй Aлeкceeвич 8 Jun @ 11:02am 
In my game this mod is too sharp and not smooth at all, which breaks the very meaning, I am sure that it should not be like this, please tell me what the problem is?
MG.Rogers 21 May @ 6:10pm 
I really like this mod
yoru 17 May @ 2:16am 
the sway intensity is hilariously bad
Рома Фактс 6 May @ 6:23am 
@skeletonwithagun of course it works, black mesa view tilt is a script
Mr. Blue 27 Feb @ 5:38pm 
@XENORT I need to know. how does your flashlight point where the gun points in firstperson, I seen a few mod that remove that feature but I don't have the feature at all. is there a command I need to enter?
Tibbs 17 Feb @ 10:03am 
@skeletonwithagun iirc it does work with black mesa view tilt
@zacko sadly, no
chickenjoykey 4 Jan @ 11:28pm 
will this work with black mesa view tilt?
claau.sgv 2 Jan @ 10:08am 
i want this to be the same as css