0
\$\begingroup\$

Background

In a top-down game, I have particles that spawn animated textures. I have my 2D renderer settings set-up so that it orders sprites based on their position on th Y-axis via "Transparency Sort Mode > Custom Axis > Y".

The Problem

But instead of sorting for each particle spawned, what happens is the particle system obeys the setting as a whole so that the sort order is only based on the particle's system's center.

Is there a way to have each particle obey Transparency Sort Mode individually?

What I want for each particle:

Green spikes go behind gray fence based on their individual pivot.

What actually happens:

Green spikes go behind gray fence based on the center of the particle system.

Other Solutions

Other people seem to have an old workaround to use GetParticles and setting their "order in layer" individually. See this thread from 2015:

https://forum.unity.com/threads/particle-systems-with-sprites-order-in-layer.464533/

But I'm trying to find if there's a cleaner solution for Unity 2019 without having to fudge with "order in layer".

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.