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

Simple Polygon Physics Issues #1276

Open
Calcue-dev opened this issue Feb 6, 2024 · 1 comment
Open

Simple Polygon Physics Issues #1276

Calcue-dev opened this issue Feb 6, 2024 · 1 comment

Comments

@Calcue-dev
Copy link

In my game, I have a scenario where (simple) polygons are created dynamically in parts from vertices.

However, I am facing what appears to be a bug with the physics between these Polygons.

Take the below image of 2 polygons (showing vertices ordering via numbers).

polys

I have recreated this example that shows a Polygon in two parts but when they collide together the behaviour is extremely strange, see the video below.

poly-issue.webm

As you can see above, once the two polygons collide one is strangely thrown around.

Does anyone know what might be going on here? This is just one example but I have other polygons also facing the issue.

See below for a codepen recreation including all vertices used etc (using phaser + matter) and some additional information embedded in the pen.

Codepen Recreation

@Calcue-dev
Copy link
Author

Here is a more basic concave split in two halves with slowed speed and debug stats printing on the canvas. Need full screen to see all details. Codepen Example 2

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

No branches or pull requests

1 participant