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

Wrong normal over floor edge, no floor detected (2D) #91451

Open
berarma opened this issue May 2, 2024 · 2 comments
Open

Wrong normal over floor edge, no floor detected (2D) #91451

berarma opened this issue May 2, 2024 · 2 comments

Comments

@berarma
Copy link
Contributor

berarma commented May 2, 2024

Tested versions

  • Reproduclibe in: 4.2.1 and 4.3-dev6

System information

Debian GNU/Linux 12.5

Issue description

Collisions between the edges of rectangle shapes are obviously wrong. An object falling and being stopped by an edge can't have a normal pointing to one side (in the X axis). All movements and shape edges are parallel to axes. In this case, any object stopping another object from falling has to be floor and have a normal pointing up.

In the example project, the floor isn't detected at first for several frames, then it starts being detected. It stops the object from falling from the start though.

Steps to reproduce

Try the MRP with "visible collision shapes" on to be able to see anything. Run the project and see the movement of the objects in the window and the messages in the console output.

Minimal reproduction project (MRP)

collision_normal_test.zip

@berarma berarma changed the title Wrong normal over floor edge, no floor detected Wrong normal over floor edge, no floor detected (2D) May 2, 2024
@berarma
Copy link
Contributor Author

berarma commented May 9, 2024

Setting the safe_margin to the lowest value 0.001 seems to be working. It still detects a collision but the calculated normal is correct and the object can keep moving along the edge.

It remains to be seen why the engine doesn't decide if it's a floor and the correct normal with a higher safe_margin.

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

No branches or pull requests

2 participants