Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Animation Rigging: Holding a rifle

Discussion in 'Animation Rigging' started by dgoyette, Dec 8, 2019.

  1. dgoyette

    dgoyette

    Joined:
    Jul 1, 2016
    Posts:
    4,193
    I'm just getting started trying to use out the new Animation Rigging package, and I was wondering if what I'm trying to accomplish is reasonable easy, and a good use of the rigging package.

    Basically, I want a character to hold a rifle, while potentially doing other things. When merely holding the rifle in one hand, there's no constraint: the rifle can just be a child of the hand bone, and all is well. But to aim the rifle requires coordination of two hands, one near the trigger and one on the barrel of the gun. I'm trying to figure out the best approach for this.

    Mixamo has a lot of character animations with rigs holding weapons, but I don't think I can really use that dynamically. Meaning, I couldn't have the character stand in one place and aim in various directions. For that, I was planning to add some constraints using the Rigging package.

    Has anyone used this package for this purpose? Can I set up a constraint where the left hand is kind of a child of the right hand, so that where the right hand aims, the left hand maintains its rotation and distance, so that the barrel hand stays on the gun? How about getting the gun to aim at a specific target?

    The other question is whether the character can walk realistically while holding the gun in two hands. For that I might just use normal animations, without animation rigging, because the motion needs to be kind of fluid. But maybe there's a simple way to keep the arms swaying naturally while walking and holding the gun with two hands.

    Anyway, sorry for the somewhat vague questions here. I'd just like to know if this is a good system to suit my needs.
     
  2. jnseb

    jnseb

    Unity Technologies

    Joined:
    Oct 3, 2016
    Posts:
    10
    Hello,

    I think the Advanced Animation Rigging Blog Post would provide all the insight needed to address the use case you're describing... Please let me know if you need additional information.

    Best Regards,

    Jean-Sebastien
     
    dgoyette likes this.
  3. dgoyette

    dgoyette

    Joined:
    Jul 1, 2016
    Posts:
    4,193
    That's great, thanks. I hadn't seen that tutorial. It definitely seems to cover exactly what I'm looking for. Nice work on getting this content together.