Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

One way platforms don't have consistent collision on edge #28895

Open
Tracked by #45334
sicienss opened this issue May 15, 2019 · 3 comments
Open
Tracked by #45334

One way platforms don't have consistent collision on edge #28895

sicienss opened this issue May 15, 2019 · 3 comments

Comments

@sicienss
Copy link

Godot version:
3.1

OS/device:
Windows 8, Toshiba Satellite

Issue description:
This is a rehash of closed issue #14724.

One-way StaticBody2Ds with rectangular CollisionShape2Ds do not consistently detect collision with a KinematicBody2D player when the player is on the edge of the platform.

Here is a video demonstrating the issue:
Untitled1

Even at low velocity, sometimes the player falls through the platform.

The player's movement is done by move_and_slide(), but the issue is also present when using move_and_slide_with_snap().

Steps to reproduce:

  1. Create a basic platformer with a rectangular player and a rectangular one-way platform.
  2. Position the player atop the one-way platform on an edge.
  3. Jump repeatedly until the player falls through.
  4. Adjust nearness to edge if you can't reproduce immediately.

Minimal reproduction project:
test_project.zip

@akien-mga
Copy link
Member

Confirming that the issue is still reproducible with the attached project. PR #36280 aims at fixing it (and many others).

@akien-mga akien-mga added this to the 4.0 milestone Oct 1, 2020
@capnm
Copy link
Contributor

capnm commented Oct 1, 2020

I can confirm, it's broken in v3.2.3.stable and #40645 #38471
#42574 (#42575) fixed the issue for me in the 3.2 branch.

@madmiraal
Copy link
Contributor

No longer fixed by #42574 (#42575).

At high speed and when close to the edge, the collision normal returned is the normal of the side, not the top of the CollisionShape. One-way collisions treat collisions with the side as pass-through, hence the object falls through at high speed when close to the edge. Not visible with a normal shape for the same reason as #23140.

Related to #43014.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants