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

Prevent body from being forcefully pushed through other body #1326

Open
vVattghern opened this issue Dec 31, 2024 · 1 comment
Open

Prevent body from being forcefully pushed through other body #1326

vVattghern opened this issue Dec 31, 2024 · 1 comment

Comments

@vVattghern
Copy link

Hey folks!

I am using matter.js (in addition to p5.js) for a rather ambitious student project where we are trying to use real world user drawings as inputs for physics bodies to solve some rudimentary puzzles in a short little game. One such puzzle requires the player to draw a body that would wedge between a rotating ball with spikes and a static wall. You can see a demo (and my obvious problem) in the video below:

MatterIssue.mp4

As you can see, my body just gets pushed through the wall by the rotation of the spikes, instead of halting it (like one would expect from actual world physics). Unfortunately no experimenation (e.g. changing body types, changing static/dynamic, changig body properties) has changed anything about this, so I am left wondering if this is down to a limitation of matter.js or if it is incompetence on my side.

I would be super grateful for any help, as setting this level up was quite the headache already and I would hate to forego the puzzle concept because of physics engine tomfoolery.

@vVattghern vVattghern changed the title Prevent dynamic body from being forcefully pushed through static body Prevent body from being forcefully pushed through static body Dec 31, 2024
@vVattghern vVattghern changed the title Prevent body from being forcefully pushed through static body Prevent body from being forcefully pushed through other body Dec 31, 2024
@ggorlen
Copy link

ggorlen commented Jan 1, 2025

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

2 participants