Search Unity

First-person weapon poses, aim & roll animation

Discussion in 'Scripting' started by vincentellis, Mar 13, 2019.

  1. vincentellis

    vincentellis

    Joined:
    Oct 21, 2013
    Posts:
    100
    I've been watching some GDC videos and I was intrigued by the techniques demonstrated by Overwatch & Destiny:




    On those marks, you'll see the animators explaining how they created pre-made poses for aim & roll situations. However, it's not clear how this is integrated in the engine itself.

    Does this mean that for each weapon, there are animation clips called lean_left, lean_right, lean_up, lean_down and those are played when the camera code detects one of those motions? What about movement forward and backward? Has anyone implemented something like this and could share how they did it? Thanks a lot guys!


    ps: My current weapon camera code looks a lot like the Destiny demonstration: a static model attached to the camera and feels like S***.
     
  2. vincentellis

    vincentellis

    Joined:
    Oct 21, 2013
    Posts:
    100
  3. Lethn

    Lethn

    Joined:
    May 18, 2015
    Posts:
    1,583
    So I haven't implemented something like this myself yet as I haven't done a normal FPS, but from my knowledge of unity note the keywords he used 'additive lag' that means there's a delay between the camera motion and the movement of the guns, this tells us that if you want to implement this sort of effect late update would be a good option for having the camera following the motion of the gun and then yes for the wobbling and leaning etc. these would be keyframed animations most likely.

    To implement this effect I would have the movement code itself on an empty with the gun model attached and then maybe have just the aiming code attached to the camera with a fixed update. If you wanted to be able to control it all better you could have the camera lateupdate follow the position of the code and maybe put some kind of float delay in? I don't know how I would do that but I'm sure it's possible.

    You should also use blend trees for the animations themselves to make everything work nice and smoothly, hope this gives you some ideas of where to start.