How do I make a moving platform that stays in one place?

I have made a moving platform for a game that I am making on GDevelop, I added the movement behaviour for the moving platform and it works but however it continues to move forward instead of back-and-forth in one place like other moving platforms.

Is there anyway I could fix this?
IMG_1579

You can add a rectangular movement behavior (or something like that).

1 Like

The standard way is to place 2 blocks at either end where the platform should reverse direction. Then one implementation is:

  • name one of the blocks go_right and if the platform collides with it change it’s direction to the right.
  • name the other block go _left, and if the platform collides with it change it’s direction to the left.