M
M
Mimocodil2021-01-02 00:16:05
Unity
Mimocodil, 2021-01-02 00:16:05

How to make a sprite be on top of another if it is in front of it and behind if it is behind?

Example in the illustration:
61d0c22bcd8cb019078953.png
At the moment, I see such a way out - to dynamically change the Order in Layer for all objects, so that those to the south (lower) have a higher priority. There will be about 800-1500 stationary objects and less than 100 moving objects on the location at the same time, and there will be no change in the camera's viewing angle or its rotation.

But maybe there are better solutions?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question