Camera Seeing Green Background

Below are the screenshots. Problem: On play I am seeing just the green background, not any of the objects.

Code:

Thank you for your help!

Hi Tia,

Check the position of your Speed Driver and other game objects that you expect to see in the game window. They must be in front of the camera. According to your screenshot, the Main Camera is at z = -10, so “in front” means “higher than -10”.

Does the “Thing To Follow” field reference the “Speed Driver” from your Hierarchy?


See also:

Speed Driver yes is the car object and its listed in the Thing To Follow field. I’ll check the depths thank you Nina.

I checked the depths here is a shot of my screen in the 3D view. However I’m still just seeing the camera ‘green’ background on run.

What did you expect to see instead of a green background? In your first screenshot, the “Background” colour of the Main Camera is set to green. The same green that appears in the background of your preview window and probably also in the game window. Or am I misunderstanding your problem?

When hitting play shouldn’t I see my objects in the scene I have set up above, not just the green background? Below is a picture of my ‘Scene’ setup that is what I should be seeing when I hit play. It has nothing to do with the ‘color’ of the background but the fact I cannot see any of my game objects.

I found the error I was missing a comma in the Vector 3 statement. new Vector3(0,0, -10); (Corrected)

Well spotted. Now that you mentioned it, I see it too. :slight_smile:

For future reference, please share your code as formatted text, not as screenshots because I find it fairly difficult to read text on screenshots.

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

Privacy & Terms