Download

Sorting policy withing actors

Hello, everyone, I’m gonna ask you what most likely is a dumb question, so just bear with me for a sec.

I’m building a little 2D project with my pals and I’m having a bit of an issue with sorting policy for flipbooks and sprites (using Paper2D).
The viewpoint for the game is similar to classic RPGs like old Final Fantasy titles or Pokemon, so, by default, I’m sorting stuff by their position on the Y axis and everything seems to work for simple actors.

The problem came up when the time came to implement changes in the appearance of the Playing Character, like equipment or similar stuff. The best way to do this is for the appearance to be modular, so I can add stuff on top of the basic appearance and not have to have a flipbook for every combination of items. Thing is, how do I sort these flipbooks inside the character? It seems like they are sorted like everything on the outside, by Y axis, but that’s a problem, because I can use positions to correctly sort the appearance of the character, but if I stand close to something else, that something could get in between different flipbooks inside my character.
So how can I do it? Is there a way to put together a flipbook at runtime combining different ones? Or a way to use different sorting methods inside and outside of actors?

I hope I’m being clear on what I mean and if you don’t understand it’s most likely my fault, since English is not my first language. So you’re free to insult me and please correct my grammar if the need arises.

Also, please help me find a solution, hopefully one that’s fairly simple and it’s gonna make me feel astonishingly stupid.

Here’s the other version of this question, I don’t know if it’s gonna be of use. I was gonna call it the “verbose” version, but I guess “verbose” is a standard for me.
https://answers.unrealengine.com/questions/520059/can-i-set-different-sorting-policies-for-sprites-o.html

Thanks in advance.

Yeah, noticed now a typo in the thread title.

That’s a good way to start. :cool: