My background falls down out the scene when I press the play button.

Hi guys, I apologize with you all, this is my first post, and I know it might be a stupid question but I’m new to Unity and I got stuck with my background falling down.

I’ve been trying the 2D UFO Tutorial, I perfectly did my project as in the videos, but after the script, when I pressed play my background is falling down. It shouldn’t be correlated to the script, it looks exactly as in the tutorial.
Thanks for any help.

Right, I doubt this has anything to do with scripts. More likely you’ve got a Rigidbody set on the background, and incorrectly configured so that the physics engine is making it fall.

(I swear, 90% of the issues newbies run into are caused by the physics engine… even though I hardly ever use it in my projects. I wish the beginner tutorials didn’t use it so much.)

Thanks, at first look my background had no rigidbody2d applyed but after I runned the game a rigidbody2d appeared, anyway, problem solved thank you

1 Like

Hi, dude. I’m having a similar issue, but when i run the game there’s no rigidbody appearing. I don’t have a clue of wtf is going on lol.

Please don’t necro old posts like this, just create your own and post your own detail. Don’t assume it’s caused by the same thing.

Anyway, without any information it’s almost impossible to help you so all that is left is guessing.

Check it’s not your camera moving up; no idea if it’s just the background moving “down” or everything. In the end, if a GameObject is changing position, it’s the Transform being changed. It’s not magic so just check what’s changing the Transform. Obviously Rigidbody(2D) do this but so do other things like animation, your scripts etc. Unity doesn’t decide to do this on its own; it’ll be a script or component you have.

Also, you need to describe what “background” is. Sprite? UI?

Side Note: Why do you have to use language like “wtf”? It doesn’t help.

1 Like