- Home /
Background object moves to front in camera view.
I have a scene with two cards, one in front of the other. If I move the front card downward, at a certain point, the backgrounded card pops into the foreground, although only in the camera and game views, not in the scene view. Please check out the screenshot. Any ideas why this might be happening?
Screenshot https://drive.google.com/file/d/1QsBH_m7A53BHbgfknQFoeDuJ4EHxNs5u/view?usp=sharing,
Answer by I_Am_Err00r · Jul 12, 2019 at 07:12 PM
I haven't seen your screen shot, but this is a 2D game right? If it is, on the spriteRenderer component, you need to make order in layer a smaller number than the card that is sitting on top of it. You will probably also need to code it so that as you shuffle and change cards, you move the order in layers up for all the cards underneath.
Let me know if this is the case.
Answer by eggdeng · Jul 12, 2019 at 11:14 PM
Thanks for the suggestion but actually it's 3D. I'd appreciate if you could take a look at the screenshot as it might save time and trouble and give you an idea of what I'm trying to do.
Your answer
![](https://koobas.hobune.stream/wayback/20220612204806im_/https://answers.unity.com/themes/thub/images/avi.jpg)