This is the testing Godot forums! All forum posts unique to this forum will be deleted! Please use the main forums here for any posts you want to keep. All forum rules still apply.

One-Way Collision for Platforms

saguarosaguaro Posts: 8Member
edited August 2016 in 2D
I want one-way platforms the player can walk on, but if the platform is low to the ground the player can still pass through the sides.<br /><br />When I use a static body with one-way collision set at (0,1), the player can run through it from the left, but collides with the right edge when approaching from that side.  Also, sometimes if the player changes direction from right to left in the middle of the platform, the player is slowly pushed/forced out of the collision shape.<br /><br />I am not sure why the player collides on the right side, but not the left. That seems weird to me and I can't explain it. I've checked the player RigidBody2D, the raycasts, etc. I've even imported a platform from the platform demo to make sure I'm not building it incorrectly.<br /><br />I think I need to disable collisions until the player's feet collide with the top of the platform, but I'm not sure of the best way to go about it or if there's a better solution. Any help is greatly appreciated.

Tags :

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.