# Having trouble with sprite sorting by Axis

**URL:** <https://forums.unrealengine.com/t/having-trouble-with-sprite-sorting-by-axis/486207>\
**Category:** Rendering\
**Tags:** sorting, unreal-engine, Rendering, UE4, question\
**Created:** [July 14, 2021, 7:43pm UTC](https://forums.unrealengine.com/t/having-trouble-with-sprite-sorting-by-axis/486207 "2021-07-14T19:43:15Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![BladeDev](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@BladeDev](https://forums.unrealengine.com/u/BladeDev)\
**Post date:** [July 14, 2021, 7:43pm UTC](https://forums.unrealengine.com/t/having-trouble-with-sprite-sorting-by-axis/486207/1 "2021-07-14T19:43:15Z")

</div>

Hi, I am having trouble with sprite sorting (the way your game renders sprites on top or below the other). I am making a topdown 2D game with pokemon/2d zelda character movement (free movement, doesnt snap to a grid). I want my character to be able to walk both in front and behind certain objects.

 ![344085-capture5.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/d/e/bde5c37af001b3732ed7ee3e160609cef639f145.png)

In project settings, there is a way to sort translucent things (Like sprites) along an axis. If I choose “Sort Along Axis” instead of “Sort By Distance”, and choose the Y axis (Which is the axis that my game character uses to go up and down) then, in theory _and according to how the feature itself works_ it should work. So, I tried it.

![344087-capture1.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/4/6/74692e7bebe5b57de4efbf9429c2d717c35a9a32.png)

![344088-capture3.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/4/d/e4da14167b0abe6b569acceab3bf7df2bfa8c28a.png)

All right, it seems to work but in the reverse of how I want it to : The character steps on top of the statue and goes behind it’s front. So I tried to fix it by changing the Y sort axis from negative to positive like so :

 ![344101-capture6.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/8/e/58eac611e5ee4e93d8a06f58ded340803f35d709.png)

Aaaaand it changed nothing. The character still goes behind on the front of the statue and goes on top of the statue sprite when it should go behind it. I also tried rotating the whole game 180 degrees to reverse the Y axis sorting side and it still doesn’t change the sorting order. On top of this whole issue of sorting on the wrong side, there’s this awkward middle ground :

![344079-capture.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/4/3/c43919d807d88c197fe46b8d7942eea0e003f1ce.png)

So I thought this was a engine glitch and went “Okay, it’s fine, I’ll use a newer version of unreal engine”. I tried using both 4.26 and 4.24 and the same thing happens, so I think it’s a feature rather than a bug. Does anyone know how I could make this right?
