GeckoLib

GeckoLib

155M Downloads

How to disable animation transitions

LearnMC opened this issue · 3 comments

commented

Hello, we like Geckolib very much, it's very convenient and easy to use, but we've recently had some problems with animated transitions. Even if the transitionLength is set to 0, there is still an animated transition, it is short, and make the animation twitch. We've adjusted the articulation between animations in Blockbench. Is there a way to turn off animation transitions completely?

commented

Might need an example of what you're talking about

commented

可能需要一个例子来说明你正在谈论的内容

I wrote the code below:
RawAnimation.begin().then("model.opening", Animation.LoopType.PLAY_ONCE).thenLoop("model.opened")
@OverRide
public void registerControllers(AnimatableManager.ControllerRegistrar controllers) {
controllers.add((new AnimationController<>(this,jud())).transitionLength(0));
}
I have two animations, which are: “model.opening” and "model.opened". The "model.opened" animation is a rotation that plays in a loop, but the "model.opened" animation to "model.opened" automatically transitions, rotating a little earlier and then starting from 0 to spin, so that there is a visual twitch.

commented

There will be a short zoom twitch between the two animations