One-Way Collision on Diagonal Platforms

Godot Version



Hello! I’ve been working with Godot for a few months now, and I’ve really been enjoying it! I’ve been working on a little platformer, and have run into the first issue I haven’t been able to figure out on my own: How Do I make One-Way-Collison work on a diagonal?

Example Screenshot:

In the screenshot attached, I have been able to make it work on a flat platform, where the user can jump up through the bottom, but will top on the top. (That’s the Green arrows) . However I was hoping to achieve that same effect, but instead of the collision vector being top-to-bottom, it was offset to a 45-degree angle instead, for the diagonal part (That’s the Red Arrows). I saw that the “One-Way Collision Vector” option existed in a previous version of Godot, but I cannot find it in the most recent version. Any suggestions on where to look, and keep digging? Thanks!

It’s an option on the body or collision object.