Search Unity

Hand grab animation with Vive triggers

Discussion in 'AR/VR (XR) Discussion' started by Kilfeather94, Feb 26, 2017.

  1. Kilfeather94

    Kilfeather94

    Joined:
    Feb 8, 2014
    Posts:
    23
    So basically I'm trying to figure out how to animate the players hand models when you press the trigger on a vive controller. Depending on how far down the trigger is pressed, the more "clenched" the hand will be. I figured the best approach would be to get the axis value of the trigger input by setting it to a float, and setting a float parameter in the animator for the hand animation, however I can't seem to get this working. Both hand models are also rigged.
     
  2. Ostwind

    Ostwind

    Joined:
    Mar 22, 2011
    Posts:
    2,804
    Well your idea is correct and should work depending how you setup it. Simplest way is to have a blend tree with 2 poses, open and closed hand frame and then blending between the two based on your param. Depending of your hand mesh you can make it look better and more natural by using more poses to transition between.
     
    Kilfeather94 likes this.
  3. Kilfeather94

    Kilfeather94

    Joined:
    Feb 8, 2014
    Posts:
    23
    Used a blend tree, with two different hand poses and it works perfectly now. Thanks very much for the help :)