Sprite doesn't show up when I start the game (SOLVED)

It took me a while to get the camera to work and follow the player, but now that I’ve implemented it, every time I start it, the sprite disappears. I can still move and the camera follows, but the sprite just doesn’t show.
image



image
How come it does this? I’ve tried a bunch of stuff with the z axis, but it hasn’t fixed anything so I don’t think that’s the issue.
If I remove the camera, the sprite does appear when I start it, so i’m sure it’s the camera.

If you can send me your project in private messages (in the state when sprites are invisible) I can take a look and let you know what the problem is.

How did you configure the camera? Can you show the camera properties? Did you set the near and far range to include the z-position of the sprite? Did you check the Orthographic checkbox?

1 Like

Not quite sure what file to specifically send, this is my first time properly using Defold so I don’t know what File contains the stuff I want to show

For small projects, you can zip up your project folder (without the build and .git folders) and add the zip here or in a DM.

MoA Test.zip (2.6 MB)
Thanks, here it is

image
The Sprite Z is 1

I have sent it in the thread now

Your player sprite is at z=0, your camera starts at z=0.1, change Near Z =-0.1 and you will see the sprite.

3 Likes

Thank you so much, I have realised I was never changing the sprite’s Z position, but it’s scale instead. Massive oversight on my part, thanks

2 Likes