Sprite is covered by another sprite in the back

Sprite is covered by another sprite in the back.


Please see the following GIF.

The grass is located behind the building. At first the grass doesn’t appear. When moving the camera, the grass appear in the front of house. But the grass isn’t expected to appear.

276053-spritecoverbug.gif


Simple reproduce steps:

  1. Open a new Level
  2. Create 2 Actor, and add component “PaperSprite” for both. Add any texture to the Sprite on them.
  3. Set location of ActorA to (0, 0, 0), and set ActorB to (0, -20, 0). So that ActorB is lightly behind ActorA.
  4. Pilot the camera, in a near and side view. And you can find ActorB is render in the front of ActorA.

Is it a bug? Or there is some optimization setting I should turn off?

I can’t find discussion of this problem. Thanks for any advice.

You can change that by going in the project settings and into “Rendering” under the “Engine” section. You should have a parameter called “translucent sort policy” set on distance by default, set it to “projected Z”

That’s work! Thanks!