Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Have a look at our Games Focus blog post series which will show what Unity is doing for all game developers – now, next year, and in the future.
    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:
    53
    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:
    5
    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,
     
unityunity