0 votes

Hi, I am using Godot 2.1,4.
I know we can set one way collision in static body 2d, but it block 3 directions and allow only 1 direction to pass through.
What I want to achieve is allow 3 directions to pass through, eg. bottom, left and right, and only block one direction, eg. top.

How can I achieve it?
Thanks!

in Engine by (247 points)

Have you tried with 3 one-side segment shapes?

not yet. But how do I arrange the 3 one-side segment shapes topologically?
Thanks!

Sorry, I was confused with Godot 3 that use one direction on the shapes, not the bodies...

I wonder if rotating the shape may work on 2 but probably not, I guess you will need then a composite body made by 3 bodies with different direction for collision (a top, left and right body).

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.