Prevent force-dragging bodies through other bodies with MatterJS

后端 未结 4 1675
醉梦人生
醉梦人生 2021-02-02 14:27

I\'m using MatterJs for a physics based game and have not found a solution for the problem of preventing bodies being force-dragged by the mouse through other bodies. If you dra

4条回答
  •  一生所求
    2021-02-02 15:24

    This seems to be related to issue 672 on their GitHub page which seems to suggest that this occurs due to a lack of Continuous Collision Detection (CCD).

    An attempt to remedy this has been made and the code for it can be found here but the issue is still open so it looks like you might need to edit the engine to build CCD into it yourself.

提交回复
热议问题