Search Unity

animations driven by user movements

Discussion in 'General Discussion' started by Epic_Cube, Nov 11, 2021.

  1. Epic_Cube

    Epic_Cube

    Joined:
    Jul 3, 2012
    Posts:
    100
    Hi all,
    I'm creating a VR experience for Oculus Quest where the user should move around the space and interact with virtual objects.
    I'm using the XR Interaction Toolkit to manage the user movements and the controllers.

    I'd like to represent a user as a complete character with head, arms and legs.

    Using inverse kinematic I'm able to move the arms respect to the controllers movements, for the legs I'd like to use any animator that, using the direction and the velocity of the user (using the deltas of head in space) will animate the legs with idle, walk, etc.

    Do you know if there exists any tool or XR Interation Toolkit feature that does that?

    Thank you
     
  2. angrypenguin

    angrypenguin

    Joined:
    Dec 29, 2011
    Posts:
    15,620
    I'd look into Mecanim. I think it does most of this for you out of the box. Set up an animation state tree with a variable for the player's velocity, and set up states and transitions for the right animation to play. The only bit not done for you is a script to set the value based on player movement.
     
  3. Epic_Cube

    Epic_Cube

    Joined:
    Jul 3, 2012
    Posts:
    100
    Yes of course. I was wandring if there exists something ready to use alredy set to work with XR Interaction Toolkit :)