Mirroring/Flipping SMD animations not working correctly or not possible?

I am porting over weapons from CS:GO into other games such as CS:S or Garry’s Mod using Blender. Everything is working correctly, except for animations. CS:S and custom Garry’s Mod TTT weapons are animated on the left side. CS:GO animations are animated on the right side. This causes a problem where CS:GO animations will be animated on the left side of the screen in-game. I need them to be animated on the right side.

This is what it looks like in-game.


This is what its supposed to look like (photoshopped mirroring).


Here is what I did:

Imported the AK47 + Arms model.


I then imported the Draw animation.


I scaled the skeleton by -1 on all axis. I rotated it to match the old position before scaling it.


I exported the mesh and the skeleton, but when I opened the AK47 + Arms model and then loaded the scaled Draw animation, this happens…


The left arm and the AK47 are rotated and located incorrectly. The right arm is slightly rotated incorrectly.

So, is there any way to mirror an animation AND get it to export correctly? I tried everything but nothing worked :confused:

As far as I can recall, there’s usually a line in the weapon script somewhere that states whether the animations were built right-handed or not for the weapon in question. Check the script for your compiled weapon to see if that setting is set to 1 or 0; if it’s set to 0, set it to 1 and it should correct itself.

I can’t do that as all CS:S weapons are hard coded to play on the right side. And for Garry’s mod, I do not own the servers I play on and therefore I can’t modify scripts to change the right-handed line.

I made some skins for CSS and used these script files (Since they are not present in the game files)

The file may be old but they still work

  1. The weapons are not hard-coded for CS:S; the animations themselves are usually built left-handed, and there is a certain value in the weapon_*.CXT (or .TXT if you converted them) file for the weapon slot in particular that you can change to effectively flip the weapon to either side, depending on how the animations are set up. See isaa1’s post for the scripts I uploaded a while back as an example, as well as some of the CS:S skins I uploaded over on GameBanana for further examples.

  2. If you’re not able to modify the files due to not owning the server, consider talking with the owner(s) about having them make the appropriate changes for the necessary files once the skins are ready, if not sending the files to you directly so that you can make the changes on your end and then send them back for the owners to apply them to the server afterwards. Other than that, the only other option would be to find a way to properly mirror the animations without breaking the rigging.

The files are both old and current; after Valve updated the game back in 2011, the scripts themselves have literally not changed whatsoever, and each subsequent update to the game afterwards has not changed how these scripts function either. The date the scripts were updloaded are definitely a sign of their age, but their functionality is still exactly the same as they were after the 2011 update that supposedly rebalanced the game. :eng101: