The most efficient way of stopping player at a wall?

Hi everyone! I’m fairly new to Gdevelop and tried using the “separate objects” event which works, but I just want to make sure this is the most efficient and less memory intensive way of stopping a player at an invisible wall. I provided a screenshot of the scene and my code. Please critique so I can learn.

1 Like

Excellent drawing. How does the player move? (Top down, side scroller, free roam…) Do the walls or camera change positions?

1 Like

The player moves left and right using the Left and Right key. That’s it.

I might add camera movement down the road once I make the scene longer and have it pan once the player is in the center or something like that.

The first action is good (move alien1 from wall), but not the second one. Since alien1_mouth isn’t overlapping the invisible wall, it won’t move.

If you want the alien1_mouth to be in a fixed position on the alien, then you should look at using the sticker extension.

1 Like