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

Question How did developers make characters aim before the animation rigging package?

Discussion in 'Animation' started by PowerJake, Jun 4, 2021.

  1. PowerJake

    PowerJake

    Joined:
    Nov 15, 2019
    Posts:
    64
    Hey, I am working on character controller similar to that of alien swarm and I'm at the stage where I need to make sure the gun is pointing forward on the animation. I am worried about adding unnecessary complexity to my character by using the animation rigging package. I don't want my code to have to manage all the constraints and tell constraints when to disable for reloading and such. The problem with this is now how do I make sure my characters point their guns where they are aiming when I am cobbling together animations from mixamo and basic ones that I create by my own hand?

    The idle, running, and strafing animations cover the whole body, but when a gun is equipped, the upper body plays another animation that overrides the upper body using animation layers. This is what that gets me. The character is supposed to be aiming directly south.
    upload_2021-6-4_13-12-38.png

    I could use a multi aim constraint to turn the upper body to aim forward correctly but then my code has to manage enabling and disabling that constraint as well as maintaining the offset for any weapon aiming animations where the upper body's forward isn't flush with the aiming direction. If I want to add a hurt reaction animation that rotates the body then things seem to get even messier.

    One solution I have tried is to simply use the full body pistol locomotion animations available on mixamo, but if I do that then I need a set of animations for every weapon holding stance. The mixamo animations are also messed up by the cartoony proportions of my character. I'd rather be able to overlay one or two weapon specific upper body animations on top of the base locomotion animations like I am trying to do now.

    Are there simpler options than animation rigging if I want to keep my upper body animations separate from the full body ones?
     
  2. Serkan90

    Serkan90

    Joined:
    Jul 9, 2017
    Posts:
    6
    I am struggling with this aswell, i think the best option is to use two bone IK constraint to hold the gun then use multiaim for aiming,