KybernetikGames / animancer

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

Is there way to define StartTime and EndTime for each transition in the TransitionLibrary? #365

Open karen-barseghyan opened 1 month ago

karen-barseghyan commented 1 month ago

Hello! Transition Library is pretty neat, as I can set Fade Duration for each transition in a matrix. However, when I edit Start Time and End Time, the change happens globally, for the transition asset. Is it possible to also do the same for StartTime and EndTime?

KybernetikGames commented 1 month ago

Currently the system only modifies Fade Durations, but it's possible that it could be expanded to support Start and End time in the future.

What's your use case for this? The main reason I didn't implement time modifiers is because I couldn't think of any common situations where you would actually want to do that.

karen-barseghyan commented 1 month ago

To ensure perfect flow between animations, I often fine-tune the Transition Offset property, which is what I was hoping to replicate with custom StartTime and EndTime in this case. image Another key use for this is animation canceling. I want specific transitions to behave differently depending on the previous animation. For example, take two punches: left punch and right punch, both with full windups. If I transition from left punch to right punch (or vice versa), I’d like to skip the windup. However, if I transition into either punch from any other animation, the full windup should play as usual. Overall, I find the "Transition Offset" to be a neat tool in mecanim animator, and it would be amazing to have it in animancer as well.

KybernetikGames commented 1 month ago

That makes sense, I'll consider adding it as a feature in the next version of Animancer, though that won't be coming any time soon.

SMxSoMuch commented 1 week ago

Speaking of TransitionLibrary, and i didn't dig deep enough to To knowledge this. if i drag 2 asset in, that means i have to had 4 transitions control by this library right? what if i just want a one way transition? like idle to punch by transitions but punch to idle by the field/TransitionAsset?

KybernetikGames commented 1 week ago

I'm not sure what you mean. Each modifier in the Transition Library table modifies a specific one way combination of Transition A to Transition B. If you don't set a modifier for a particular combination then it will just use the default specified in that Transition Asset as if the Library wasn't there.

SMxSoMuch commented 1 week ago

Does the numbers in the Library = fade duration in the transition? that means it will ignore the asset's one and use the Library one right? let's say i generated the transition asset from animator, then put it into the Library, can it still use the asset's one?

KybernetikGames commented 1 week ago

The Library will only affect the Transition for combinations that you set modifiers for which it displays in Bold as explained in the documentation. Anything else will use the value specified in the Transition Asset.