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 glitch with polygon sliding over simple edges with ghost vertices #341

Open
GoogleCodeExporter opened this issue Apr 16, 2016 · 0 comments

Comments

@GoogleCodeExporter
Copy link

See the attached testbed demo. A polygon slides over 3 connected edge shapes 
(using ghost vertices), which form a very simple terrain with no harsh angles. 
When passing from the horizontal edge to the first downsloping edge, there in a 
collision which jerks the polygon back.

Treating the terrain as 4 vertices A, B, C, D with edges ()AB(C), (A)BC(D) and 
(B)CD(), where parentheses represent the previous/next vertices of the edge 
shape:

The unwanted collision occurs when the polygon first reaches vertex B.
If either the previous or next vertices of BC are removed, the collision goes 
away and behaviour is as expected.
Bizarrely, with both ghost vertices in place, whether or not the collision 
occurs is dependent upon the coordinates of vertex D - two vertices away from 
the point of collision.

Tested with Box2d v2.3.1

Original issue reported on code.google.com by [email protected] on 20 Dec 2014 at 8:35

Attachments:

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

1 participant