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

Syncing animation to player movement with vr controllers

Discussion in 'Animation' started by RakkuAmiya, Jul 13, 2019.

  1. RakkuAmiya

    RakkuAmiya

    Joined:
    Jan 9, 2016
    Posts:
    53
    Evening all;

    I am tearing my hair out, what I have left anyway, with a problem I'm having with a bird flight simulator. I would like to synchronise a bird flapping animation with the players flapping motion when using Oculus Touch controllers. Even better I would like to map the players point in the motion (it's a circular motion) to the corresponding frame in the animation, but I don't believe you can control animation in this way.

    From a high(ish) level, what would you do to achieve this? I already know the time between player 'flaps', and the animation is roughly a second long. Would the simplest, although not best, way be to start the bird flapping animation when the 'flap' is detected, and take a pot shot at the speed to play the animation by using how fast the player controller was moving when the flap occurred? Is there a way to adjust the animation speed mid-way? When I've tried it with animation parameters, the adjusted speed only seems to kick in when the animation loops around.

    I hope someone is able to help.

    Many thanks;

    Graeme