JavaScript, Matter.js: disable collision for one organ

As mentioned in the title, I'm looking for a way to disable any body collision in Matter.js. It must still be bound by restrictions, and after that it may be possible to turn on the collision. Is there any way to do this? The hardest part is that the object must not collide with any other object, but all other objects must collide with each other.

+4
source share
2 answers

You can use conflict filters for this. You can see an example of them working in the demo version of conflict filtering and source code .

, Box2d, , , .

+3

Matter.IBodyDefinition.isSensor

. .

0

Source: https://habr.com/ru/post/1608237/


All Articles