Hi guys,
I have a problem that I am facing. I am using matter js to make a pool like game (not exactly pool, but it looks like pool), in 2d. The thing is I am facing an issue where the balls some times just go out of the world bounds and sometimes even pass through each other.
This does not happen every time,
- The going out of bounds issue occurs when the ball is close to the bounds and I strike it towards the world bounds.
- The balls passing though each other occurs when the two balls are touching each other when striking.
The thing is that these issues do not occur every time. Only sometimes. I have searched for ways to counter this.
I tried using the scene.matter.set30Hz()
and scene.matter.set60Hz()
. They do not seem to help.
Does any one have any idea as how to solve this issue? Is it ok that I have asked this question here? Should I ask this in the matter js forum?
Update:
I was able to fix the world bounds issue by increasing the thickness of the worldbounds. I read about it in this post under Collision detection issues.
The issue where the balls pass through each other still remains, I can’t use the above approach of increasing thickness. Does any one have any idea as to how to solve this?