Demigiant / dotween

A Unity C# animation engine. HOTween v2
http://dotween.demigiant.com
Other
2.36k stars 350 forks source link

Any way to instantly jump to a specific animation time? #433

Closed alexinfurs closed 4 years ago

alexinfurs commented 4 years ago

Hi, I wonder if there's a simple method to jump directly to a specific animation time like Goto but instantly

I'm working on a rhythm game and I need a total control over animations to keep everything in sync, so I want to create an animation with easing and other cool stuff DOTween provides, and directly manage it frame by frame

Is it possible?

Thanks a lot for your support

Demigiant commented 4 years ago

Ahoy!

If you chain a SetUpdate(UpdateType.Manual), you can then animate those manual tweens via DOTween.ManualUpdate.

alexinfurs commented 4 years ago

Hi Daniele! Thanks for your support

I knew about ManualUpdate, but unfortunately it doesn't seem to be exactly what I'm looking for, because ManualUpdate updates all the manual tweens with the same DeltaTime while I need to manage them independently. It'd have been super useful if it there was an instance method too

Demigiant commented 4 years ago

Here you go :) I added a tweenInstance.ManualUpdate method, which will force the update regardless of the UpdateType you assigned to the tween (though you'll want to give it a Manual UpdateType so that it's not updated automatically). Consider that the tween will behave like a normal tween, so if it's paused nothing will happen if you updated it manually.

alexinfurs commented 4 years ago

WOW! That's great! Can't wait to test it

Thanks a lot!!

Demigiant commented 4 years ago

Let me know ^_^