#Issues with loop on imported animations

9 messages · Page 1 of 1 (latest)

timid wing
#

Hey there!

I'm experiencing an issue with importing animations into Bedrock Edition on a custom entity. Essentially, I've specified in Blockbench that there is an animation that should loop and an animation that should hold on the last frame, and made sure those settings are saved, but in the game, the animation finishes and then the entity reverts back to its normal posture without holding on the last frame of animation. Is this something I need to look into with animation controllers? I'm not trying to make any of these play naturally as they'll all end up being activated by the /playanimation command. I've also tried working with that command to add a follow-up animation to go to next but to no avail. If anyone has any idea why these wouldn't be looping or holding please let me know - thanks!

(I am not using the Entity Wizard for once, so it's not an issue there).

ebon gull
#

ok so this is hypothetical but a good guess so in block bench im pretty sure having it looped or held on last frame are more of a preview so when you use /playanimation it will only go till the end then reset the entity unless you make an animation controller like have it as an idle state of it being shut down though im pretty sure you dont want to do that so how about instead you bake the end frame into the model and make the animation have it boot up and do that animation downside you will have to redo your entire animation

#

also great model and animation i love everything about them ❤️

covert shale
#

baking the starting/final pose is one way, but the best practice is to use animation controllers. With that, you'll be able to blend between animations (or the bind pose of the model) with way more control than /playanimation, wich indeed returns the entity to whatever animation is specified in the client entity when the animation ends.

So instead, you can trigger an event on the entity to add a dummy component group, detect that in the Animation Controller with the corresponding query to transition to the state that has the animation, and remove the dummy component when it ends (or earlier for that matter).

ebon gull
#

easiest way is to make an animation controller for its idle pose to be shut down

#

as long as shut down is you starting and end fram all of the animation will blend well

timid wing
# covert shale baking the starting/final pose is one way, but the best practice is to use anima...

Thank you both for the information, it did help a lot! I'm curious about this part specifically, as I'm not especially good at coding things but looking to get better. If I'm reading this right, the best option would be to:

  • Have a command block or script trigger an event on the entity - I'm not sure what a component group is but I'll look into that, but basically something that wouldn't change anything about the entity itself but would seem to the game like it did?
  • When the event happens, the animation controller starts the animation
  • Call another event that deletes that component group
  • Returns to idle animation

And I'm not 100% sure on whether I want the idle animation to be a shut-down version yet, that was a placeholder while I was having trouble with the idle animation looping but it turns out that the hold on last frame option is just as confusing for me, and I couldn't find a way to transition smoothly between the idle and the joke.

There will also be a wide assortment of possible jokes for the bot to tell (around 30? still need to decide how much animation I'm willing to do) and if that process doesn't end up working to trigger a random animation then I might end up just baking it into the model. There are really only a few differences between the default pose and the animation itself, the mouth being probably the biggest part.

I did try to change the animation file in Bridge., which was a bad idea, as it reformatted the entire animation for some reason which caused a myriad of Molang errors and honestly I'm not sure why that happened to begin with, but I'll try to put my trust in Bridge. with an animation controller.

I'll do a bit more experimenting and if I have any more questions I'll put them here, otherwise I'll close this later tonight if I think the questions are better suited for a different thread.

Thanks again!

timid wing
#

Ultimately I think I'll experiment more with animation controllers a different time and just bake the animation into the original pose as it's not that different. I've definitely taken note of this advice though! I'll close the thread.

#

!close