0
\$\begingroup\$

I'm making an action game in Unity, where the player character can hold an item in either hand, and some objects are held in both. I want the PC to be ambidextrous, so I essentially need to be able to "mirror" hand positions, including finger orientations.

To illustrate what I mean, one of the guns in the game is a pistol with a forward grip: if the gun is held in the right hand (the grip is in the right hand), then the left hand grasps the forward grip; if the player holds the grip in their left hand, then it's vice-versa.

How I'm doing this is to have basically a copy of the hand armatures saved for each item, posed in the configuration the PC's hands should be in, and then I match those transforms when the item is held (I'm using IK to get the hands in the correct place). What I would like to be able to do is mirror those hand positions for the "left hand" hold of an object. Are there any best practices for doing things like this, having animations/poses be symmetrical or reversible or whatever you want to call it? Should I set up the PC model's rigging in a particular way, or is there some more simple way to mirror the positions?

\$\endgroup\$

1 Answer 1

0
\$\begingroup\$

Counter-Strike is the only game I can think of that made an effort to support holding weapons left handed; they went for the simplest solution and simply mirrored the right-handed models. This requires almost zero effort but means everything on the guns is flipped; anything that is really located on the right side of the gun will be on the left side of the gun when it is mirrored, and vice-versa. Your average person won't notice or care, but gun enthusiasts can be annoyed by such details. In Unity, you can mirror a model horizontally by simply setting the scale on the X-axis to -1.

There are several potential ways you can use mirroring, depending on the content of your game:

  • If you have fictional guns (e.g. in a sci-fi setting), you could simply design ambidextrous weapons that look about the same on both sides, so it's not obvious if the weapon is mirrored. Some real-world weapons still fit this idea; for example, the FN P90 looks pretty much the same on both sides.

  • Another potential option, if the animations don't involve interacting with something on one side of the weapon/item, is to mirror the arms but not the item. For example, with your typical semi-automatic pistol, all of the animations would look fine if you mirrored the arms on the X-axis but didn't mirror the pistol (if the pistol is a child of the arms, you can set its X-axis scale to -1 to un-mirror it).

With clever use of mirroring, you might not need separate copies of your animations for left-handed and right-handed use.

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .