One sprite blocking the other sprite

so I have 2 sprites, one simple, one animated,

the road sprites that you see are actually on the top of the road sprite but for some reason the road blocks the sprites? why?

anyone here? echo

Hi @sir_akc! Try to play with the position a bit. That helped me. I’m afraid you’ll have to wait for a better answer.

1 Like

can I change the layer? like add a new layer other than world? I am trying that right now, nothing happening, the new layer does nothing, I have added the new layer into camera as well but no changes, so I am experimenting there, please send help

Yes that is even better. But I think it has to do with your UI layer and not your World layer.

I think there is a serious bug here, I didn’t declare any layer and all of a sudden I see a layer called 1000? what?

Then you have removed a layer but that layer is still on the component.

hey whats the use of draw order if it actually does nothing new?

The draw order is used for layers that are set to be manually sorted. If it’s on the default world layer, that’s defaulted to render back to front (entities further away get rendered first).

i gotta try this

Also bear in mind that the depth buffer is plays a factor here.

If the game is just using sprites, I suggest putting all the world sprites on the world layer and changing the render order to be manual.

That way, all the sprites can be drawn via the draw order set on the sprite entity.

Entities don’t render over the top of other layers because there is single depth buffer used for all layers.

The UI layer by default clears the depth buffer which is why it renders on top of everything that was rendered before.

I really need to get knee deep into this

If you can reproduce the issue in a public project, someone on the forum can fork it and show how it can be setup to render how you would like it.

I think it would faster rather than reading and going through code is that if there is a way to create a separate layer that renders on top of the world layer, just that and all the problems will be fixed

See this thread 2 transparent objects

This isn’t really fixing your problem and could cause you issue later down the line.

The real problem is that the road line sprite is not positioned to be closer to the camera than the black road blackground.