How can I achieve collision only block one direction?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By icqqq
:warning: Old Version Published before Godot 3 was released.

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!

Have you tried with 3 one-side segment shapes?

eons | 2017-12-03 20:55

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

icqqq | 2017-12-05 06:54

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).

eons | 2017-12-05 09:49