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

Physics simulation going wrong #1318

Open
sampov2 opened this issue Sep 24, 2024 · 0 comments
Open

Physics simulation going wrong #1318

sampov2 opened this issue Sep 24, 2024 · 0 comments

Comments

@sampov2
Copy link

sampov2 commented Sep 24, 2024

I'm building a data visualization using matter-js and I ran into a weird issue. The simulation is based on open street map road sections that are converted into chains of circles (node) using Composites. A node can be part of multiple chains. Only nodes that are part of road sections are included in the simulation.

The simulation starts as expected. However, as the simulation progresses it seems some nodes detach from the chains and after a few more seconds, the chains start oscillating wildly and start tensioning the chains tighter and tighter. It seems as if something is increasingly adding force to the simulation.

Attached is a video a video showing what happens.

The code along with the example data can be found on this branch: https://github.com/sampov2/road-spider/tree/matterjs-going-wild

Any ideas on what is going wrong? Or am I doing something incorrectly: Perhaps chains should not include static bodies? Perhaps a body should not be part of multiple chains?

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