Jump to content

Matterjs collision breaks at high speed


Trekin
 Share

Recommended Posts

I found in my project that when objects are moving fast enough the colliders no longer work. Do I need to be increasing the mass or something so collisions register when an object is moving fast?


You can see an example by going to the Collision Filter example (https://labs.phaser.io/edit.html?src=src\physics\matterjs\collision filter.js) and setting the bounce (on line 31) to 3

Link to comment
Share on other sites

It is tunneling. Physics engines have ccd(continues collision detection) to detect such collisions but matterjs doesn't have . You can try increasing position and velocity iterations but they probably won't be enough for too fast objects. 

this.matter.world.engine.positionIterations=20;
this.matter.world.engine.velocityIterations=20;

 

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...