Structuring 4 directional cutout animation

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By JulianArnold42

I’m creating kinda complex cutout animations with ~20 Sprites for my main character. Right now I have 3 root sprites for each direction (side, back, front) and a tree with all individual sprites (arms, hands, feet, body, head etc.) below each root. Now I have an AnimationTree and one AnimationPlayer. I do need to toggle the visibility of the side/back roots (hide) and the front (show) when I want to animate the front. It’s so much overhead and gets so complex. If I need to create 5 basic animations (run, idle, attack, die, grab) I get 15 animations in total. All accessing sprites within the same scene. It would be a first step to actually create 3 AnimationPlayer for each direction. But I can only access one in the AnimationTree. How do I structure everything for 4 directional cutout animations?

I am also having the same problem with this. Since cutout animations use bones, I can't figure out the correct way to structure animation in 4 directions. I've scoured the internet looking for tutorials or at least something to reference, but all examples of this type of animation are only done in 2 directions,basically side scrollers, in which the skeleton is rigged and animated, and then programitically flipped for the opposite direction.
For four direction, and if possible 8 direction, what is the proper way to structure the bone rig? I found an answer in another game engine forumn that suggested using a different bone rig for each direction, each with the corresponding child sprites. But this would require enabling and disabling the various rigs depending on which rig direction needs to be shown. The only way I can see of doing this is altering the visibility through script.
 If this is on the right track, what code is used to disable and enable select node visibility? Also, the animation player has a keyframe for visibility. So is keyframing the visibility of the correct rigs for each animation direction a better option vs coding the visibility of the rigs through script separate from the animation player altogether?
 Any help would be greatly appreciated..

Iyt | 2019-08-16 14:18