- Home /
Sprite disappears in front of background
Hey there guys,
i got a little Problem with my sprites. A made a camera (orthographic), made an empty gameobject and assigned it a texture in order to have a background. Next i wanted to make an animation, so i made another gameobject/sprite
Everytime i want to move my sprite along the background, it suddenly disappears:
Here i move the sprite slightly to the left
Here it starts to disappear!
And here it appears again!
Different angle, so you can see, the sprite is in front of the background.
If i change the Z-Position it works, but then it disappears at another X/Y-Position. What's my mistake? Any suggestions?
I assume your texture is in only TWO planes (eg. x and y). If it's not, then your problem is that the sprite is actually going behind the texture because you're not calculating the movement of the sprite correctly.
Answer by hamedaf · Jun 18, 2012 at 09:13 AM
I think i found a solution,
change the shader on the material of the background to something like vertexlit.
I was using ragepixel basic shader on it and i noticed this.