Moving background

I want to have astroids flying in my background but I cant move background objects so I made them in the game layer but then they dont have the parrallax effect how do I make astroids that are flying in the background While the player is standing or walking. Game link:

2 Likes

You can move background objects by changing their position. I did something similar in the first level here:

How did you do that? Can I just use a push motor or what do I have to do? also I cant check the moeable box for the background objects or somthing idk let me take a look.

1 Like

Never mind there is no physics tab on the background is it automatticly moveable?

1 Like

It’s constantly applying a value to either the “+x” or “+y” (depends) inputs in a Position behavior, right as it spawns
There’s no physics, so manually changing the position constantly is how it’s done

1 Like

It says I cant add a velocity to it since it is background object how do I do this?


this is how I did it (cropped code just adds a bit of variation to the speed, position and animations)

Ok thats annoying I will try it in a second

Can I see that cropped code on how you did the changing speed?

1 Like

How do I spawn them? with a spawner/ emiter?

Spawner is the best option here

1 Like

It’s really messy, brace yourself:


the gist is to use random blocks

1 Like

I use random blocks so much for particle effects and small background objects, really useful.

1 Like