How to Make Character Move Left/Right when Touching Wall

Before proceeding, please use the forum search feature at the top of the page to check if your question has already been answered.

I am trying to make my character change direction (left/right) automatically whenever the player runs into a wall. (Think of the mobile game Dont Touch the Spikes)

When I run the game, the player should stay still until the left mouse button is pressed. Once the left mouse button is pressed, the player should then begin moving to the left automatically until they reach a wall. Once they reach a wall (Boundary) they should stop moving left and begin moving right

What is the actual result

When running the game, the player automatically begins moving to the left and does not start moving to the right when touching the side of the Boundary object.The player will only start to change direction if they are on top of the object.

The Boundary Object has Physics 2.0 and Platform Behaviors

Why did you make another topic for this? You already have one.

I made another one because I ran into a different problem after I tried what the user suggested in the previous thread. I was afraid people wouldn’t respond due to it being an older post.

I’m pretty sure the rules and guidelines say not to make multiple posts of the same thing. If you followed someone’s ideas on the other topic and it didn’t work out, tell them in that topic that it didn’t work.