Paper 2D, separating render depth from collision

Hey peeps,

A question for anyone using Paper 2D: is there a nice way to control what z-order sprites are rendered in while having them all on the same layer for collisions?

To elaborate, I have several sprites that need to overlap during play, but I want to make sure that sprite A is always rendered on top of sprite B, while also allowing the OnComponentBeginOverlap events to fire for both.

So far I have done this by having two sprites in every actor - a visible rendering sprite which is set to a certain depth in the level to ensure that sprites are rendered in the correct order, and a second, invisible, duplicate sprite for collisions, which is set to a depth that is the same for all other actors, allowing it to overlap with every actors collision sprite.

However, I seem to recall seeing settings around for z-order in various places, and I want to make sure I’m not missing something obvious - is there a setting for the rendering z-order of a sprite that I could specify, and so remove all my duplicated sprites since I could have sprites at the same depth while controlling their render order?

I appreciate any thoughts you might have!

I’m going to assume I’m doing it right then :slight_smile: