1

I have a 2d platform game and wanted to make the player be able to jump on top of it from the bottom or diagonally from bottom-left or bottom-right. The problem I'm facing is that sometimes the player gets stopped when hitting the side of the platform.

In Godot, I've created a CollisionShape2D in the platform with One Way Collision enabled. I've used a circle shape for the player's CollisionShape2D but I think the problem lies somewhere else.

How can I disable the side collisions for platforms?

1 Answer 1

4

The problem was caused by circle collision and move_and_slide. Apparently, the circle triggered a move/slide but it slowed down the x velocity to almost 0 which looked like the player hit a side wall.

enter image description here

Changing the circle to rectangle has solved the issue.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.