Just wanted to make a bug report of the following post, which may have already been passed on to the Paper2D engine and support guys by Alexander Paschall: Paper2D: actors spawned at lower Y locations sometimes moving "in front" of other spawned actors - Blueprint - Unreal Engine Forums
Would you happen to be using any translucent materials for your sprites in your project?
Do you have any screenshots of the issue occurring in your project which you can provide?
Thank you so much for your reply! The material is a Translucent Unlit Sprite Material (screenshot attached as materialChild.fw.png), which is a child of the DefaultSpriteMaterial pictured in the attached file material.fw.png.
I have also attached a screenshot from gameplay. It’s still rough, but I’ve marked a couple of the spawned actors that should show in front but–at the time of the screenshot–have jumped behind an actor that should be behind them. Basically, there are collectible and obstacles that should always be in front, and building, trees, etc. that should always be behind the obstacles, and some background objects should be in front of others, etc.
Thanks for any info and let me know if you need more info!
So, your question about translucent materials prompted me to play around. I changed the material to Masked instead of translucent and that solved the Y location “switching” issue! The only drawback is it lost me my translucent clouds, but I am totally okay with that! I cannot thank you enough!
No problem! Just in case you want to return to the TranslucentUnlitSprite Material here is an example of how Translucent Sort Priority can set two sprites to sort correctly based on their priority.
Translucent Sort Priority set to 0
Translucent Sort Priority set to -1
Also you can follow [this link] for a description of the sorting priority and how to correctly set it up.
Huh. Just when I thought I couldn’t be more satisfied… This is great! Thanks again! I suddenly feel three times smarter about this issue now!