Search Unity

Synching an Object and Animation

Discussion in 'Scripting' started by poolts, Oct 11, 2013.

  1. poolts

    poolts

    Joined:
    Aug 9, 2012
    Posts:
    113
    Using Unity's legacy animation system is there any way to nicely synch an object and an animation.

    I know the future position of a rigidbody and I want a character to basically dive and stop the object in perfect synch.

    I'm thinking if I can get the time it will take for the animation to position X, I can delay until then, and then play the animation allowing them to perfectly synch.

    So is there anyway (without iterating and sampling each frame) to get the time it will take for an animation to reach point X. On top of this if the animation never reaches it (outside the reach of the character) I can introduce a threshold for < 10f for example.

    Any ideas? :)


    Additionally, IK would be great for this, but I'm using the legacy system atm.