KybernetikGames / animancer

Documentation for the Animancer Unity Plugin.
63 stars 8 forks source link

Play transition again, even if already playing #345

Closed wrymn closed 3 months ago

wrymn commented 3 months ago

I have attack animation for my units that is played on separate "action layer". However sometimes it may happen, that attack animation may be longer (e.g. 3s) than actual attack speed of unit (e.g. 2s).

The issue is, if that happens that I wanna play attack transition again while the same transition is already playing, either nothing happens or it gets stuck, si Im probably doing something wrong here.

image

How would I handle in this part, that if same or other animation is already playing on that layer, it would cross fade at the start of newly starting transition?

Putting actionLayer.Stop() before Play() did not fix the issue.

KybernetikGames commented 3 months ago

Just enable the Transition's Start Time toggle.

https://kybernetik.com.au/animancer/docs/manual/blending/fading/modes/

wrymn commented 3 months ago

Just enable the Transition's Start Time toggle.

https://kybernetik.com.au/animancer/docs/manual/blending/fading/modes/

thank you, worked