Only certain sprites will render

During the Set Up Project lecture I have found that using any of the player sprites other than playerShip1_green causes the player sprite to render under the background.

I can fix this by changing the order in layer to 1 on the game object, but this is not necessary for the enemy ship.

Why is this the case?

Hi,

What do you mean by “this is not necessary for the enemy ship”? Is the enemy ship on the same z “layer” as the other objects? If so, you could simply be lucky because if the order of the sprites is not clear for the renderer, the renderer renders the sprites in a random order, which could be “wrong” or “correct”.


See also:

Sorry I meant that any enemy ship sprite renders on top of the background. The problem turned out to be the Z axis as you mentioned, the other sprites where always being added with a Z axis behind that of the background.

Does that mean you were able to fix the problem?

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms