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

Collision with edges between convex/planar face pair #7701

Closed
m4nu3lf opened this issue Feb 1, 2017 · 4 comments
Closed

Collision with edges between convex/planar face pair #7701

m4nu3lf opened this issue Feb 1, 2017 · 4 comments

Comments

@m4nu3lf
Copy link
Contributor

m4nu3lf commented Feb 1, 2017

Operating system or device - Godot version:
Godot 2 - 3.0

Issue description:
When a rigid body collides with a polygonal shape, edges that are between two faces forming a convex shape are not ignored but a collision with the edge is practically impossible. This causes a weird effect because if a rigid body momentarely penetrate the shape near the joining edge the body is unrealistically pushed on one side of the edge.

edges_bug
(Sorry my graphics tablet isn't working anymore, so I just used to mouse)

As you can see in image A the object hitting the flat plane made of two faces is pushed by the edge.
In image B I've drawn an edge and two faces. The edge is perpendicular to the screen. Now to understand that an edge has to be ignored we can look at the normals of the faces separated by the edge. If we compute the angle and this is greater or equal to 180 degrees then we ignore the edge.

Steps to reproduce:

Create a static body with a planar collision shape made of two faces, on the plan xz and put a spherical rigid body on top of the egde slighty off one side.

Link to minimal example project:
edge_bug.zip

@pwab
Copy link

pwab commented Jan 7, 2018

I tried to reproduce this but the example project seems to be broken (missing files).

@m4nu3lf
Copy link
Contributor Author

m4nu3lf commented Jan 7, 2018

@pwab I think this issue is minor. The bug was raised against the Godot Physics Engine, not sure if this is a problem with bullet as well.
I also think the project is in the 2.1 format

@pwab
Copy link

pwab commented Jan 7, 2018

There is no project file at all. 😅
Well you can still provide some working example for someone who wants to fix this for future releases (and it should be at least tested with Bullet too).

@madmiraal
Copy link
Contributor

#29392 is probably a duplicate of this issue, but since this issue doesn't have a working minimal reproduction project, I'm closing this in favour of #29392.

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

4 participants