Animation length equal to audio clip length

Hi there,

I’m hoping to get a simple object to move or rotate from A - B, but I want the length of the animation to be equal to an audio clip length.

So, example. If my ‘door open’ sound is 1:50seconds, How could I get my door to complete it’s animation in that time?

Suggestions would be greatly appreciated
Thanks

Hi,

Your problem isn’t really audio related. It boils down to: How do I change a parameter from value A to value B in a given time.
Research Math.Lerp, and tweening libraries like HOTween or iTween.

Cheers,

Gregzo

Thank you very much for the reply.

You’ve given me some good advice, i’ll look into this

Cheers!