I know how to set the animation state of my character just fine, but what I don’t know how to do is how to set it for anything other than the default “Sprite (inherited)” component, and how to have more than one that works.
I want to be able to have my 2D character’s head and arms move independently from his legs (it’s a top-down game), with the head and arms following my cursor but the legs are angled based on which directional key I’m using. My character already follows my cursor, and I already have the rotation system setup (if I remove the cursor tracking, my character will automatically rotate his body to the direction I’m traveling in). I just want to split those systems so that the sprite that is my character’s head and arms will rotate to my cursor, while the rotation (based on direction traveling) applies to the legs, but again, I don’t know how to get a second sprite component that I can manipulate in this way.
And now I’ve partially figured it out; I get a “Grouped Sprite” component, and get a “Paper Flipbook” component attached to that, and then I can manipulate the grouped sprite to adjust the rotation and position of the flipbook, and the flipbook is considered a valid target for all my animation update stuff.
Now what I have issue with is what nodes I can use to rotate this paper sprite, seeing as how my blueprint code is rotating the entire actor, and not the sprite (that is, it would rotate when I moved if I didn’t overwrite that movement by making my actor rotate to follow my cursor, but I want to separate it like I described before).
EDIT: I realized I gave a screenshot for the wrong section of blueprint nodes, so I removed it, but I’m not at my computer, so I can’t replace them with new screenshots. I’ll update with the appropriate images later.
EDIT2: wording tweaks and clarifications.
Okay, so here’s what I’ve got:
This is how I’m making the character follow my cursor:
This is how I’m rotating the character when I move (which then gets overwritten by the cursor tracking):
When I try replacing the “Set Actor Rotation” with something else, and then target specifically the sprite that I want to rotate, it doesn’t work (I think it gets rotated such that I view it edge-on).
you can only edit in blueprints a inherited sprite, since theres a thing called editable if inherited. I’m also looking how to have a sprite inherited but I found nothing since a long time.