Download

Sprites being drawn in wrong order at different angles

Hello,

I’ve come across a problem with sprites being drawn in wrong order depending on the direction of the camera.

The problem can be seen below. As you can see from the selection the oak(dark wood) is behind the pine(light wood) yet the oak is drawn in front. They are 100 units apart and parallel to one another.

The shader I am using is the same as the one from the Paper2D project example from Epic.

Blend Mode: Translucent
Shading Model: Unlit

Overlap.jpg

61d6d187503f9e36a44728d18e6604e52a97f489.jpeg

Another thing that is bothering me about this is that both faces are drawn yet the “Two Sides” setting is not checked so one side should be culled but is not. Any ideas?

Hello,

Click on the sprites and under settings type “sort”

There you need to enter a number. O is furthest back and by adding one you come closer to the camera.

Cheers.

Great that fixes it thanks. Do you know why it works like that? Shouldn’t it figure out this by itself when the sprites do not overlap(coordinates)?

Also still curious about the sprites not being culled. I supposed I should look around some more for it and then ask in a separate thread if I don’t find and answer:)

Go under project settings>rendering and you have an option to choose between z order or depth based. I could go on for hours why sometimes it is better to opt for z based rendering but this is not the place. Choose what best suits your needs .
Also you need power of two textures in order to start using the streaming methods of UE4. Again i could go on for hours how broken it is but just enjoy the making process and welcome to the Paper2d world!

I didn’t know there was a setting for changing between the two. Then it all makes sense thanks for quick replies anyway:)