Paper2D Sprite Sorting

Hello I was wondering what’s a good to sort sprites that attach to a another sprite. What want to do is attach a gun or sword to a sprite then have that always be in front of the character. Currently I have this kinda of working but only when the player is walking left.

But as soon as you walk right it will go behind the character.

250337-right.png

How can I fix this? I’ve tried messing around with translucent sort priority and constants nothing seems to do anything though.

if the sword is an actor component then maybe the character actor is turning 180 degrees in Yaw when he goes the opposite direction left/right, thus placing the component on the opposite facing side of his flat body just like a 3d character would

Okay so that does seem to be whats happening here I am attaching all my guns and sword to the player character so how would I go about fixing this?

I am totally guessing but if I am right, you can probably fix it by setting the component’s local offset Y to a positive number when the character faces left, and that same number but negative when he faces right. If it gives you consistent results then my theory is probably right.
If the consistent results are wrong, flip which facing direction the negative and positive versions of the component setLocalLocatiinOffset happens on.

Okay try this but how can I set a component’s local offset? I’ve search that up and all that came up was add local offset and that did was make stuff bigger.

Okay so looks I got it working. What I ended up doing was placing sprites both in back and in front of the actor. Then when you equip a gun or sword those sprites get set to that weapons sprite. Now since they both in front and back of the actor no matter what you turn it will always be in front. Thanks for help BTW on figuring this out.