GameObject disappearing *in front of* other object?
My project contains a Floor at the XZ plane, and a larger 'Deathzone' located 2 units beneath the Floor. The main GameObjects consist of the Rollerball, various blocks on the Floor, some pickups and 'Enemies', which bounce and chase the player.
Here, the gray area is the floor, and the red area is the deathzone which is actually located below the floor. Notice the orange enemy at the corner of the Floor.
Parts of the enemy are disappearing behind the deathzone, which is actually way behind the enemy. I can't understand why this is happening - any ideas/solutions to fix that?
Can you show the material you have applied to the deathzone gameObject (and the one applied to the enemy)?
Answer by reignamation_unity · Feb 17, 2020 at 03:56 PM
I had some distant mountains which had their Workflow Mode set as "Metalic" and their Surface Type set to "Transparent". When I instantiated an object which also had a transparent material, it put my object behind the mountains. When I changed the Mountain material to be "Opaque", the issue disappeared. Not sure if either of your objects had a "Transparent" setting but maybe try changing to opaque.
Your answer
![](https://koobas.hobune.stream/wayback/20220612080259im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Define and use any object from a certain class 1 Answer
Unknown loading when creating terrain 0 Answers
Array.Sort() - JS only???! 0 Answers
How do I give authority over a gameObject that already exists 0 Answers
Issue with instantiated text clone 0 Answers