[SOLVED] Fast moving rigid bodies can pass through each other

playcanvas physics isn’t good!!!

Ball crosses other balls
Collision detection is not good!:face_with_symbols_over_mouth::face_with_symbols_over_mouth::face_with_symbols_over_mouth::face_with_symbols_over_mouth::face_with_symbols_over_mouth:

playcanvas physics is bullshit!:poop:


I had a similar problem. Instead of detecting collisions, I began to use Ray Casting.

Please stop getting frustrated at the problem and indirectly, at the people that are trying to help you.

  1. PlayCanvas is using Ammo physics which is compiled version of Bullet. A well matured and long running physics library used for games.

  2. This is a common physics problem for a lot of libraries including the one included in Unity.

  3. Have you enabled CCD on the physics like I mentioned in the forums? It’s expensive but need for fast moving objects. Basically the object is moving so fast (more than its length) in each simulation step that it’s going through the other objects. CCD does another broad pass to check for collisions.


Tried the published build that you have posted and it all works fine?

1 Like

Same, working fine on my end too.

As I hit the balls at full strength, I can see the issue of balls going through meshes and each other. I’m trying to up the tick rate play around the CCD settings but not having the best result.

What I would do is change the table collision mesh to have the cushions straight down rather than at an angle like they are now.


And also keep the mesh as simple as possible. Complex meshes for collision tend to have more issues and more expensive to check against.

I think what is happening is that the only the top part of the ball is hitting the cushion so the ball’s rebound is actually going down into the table causing issues such as the ball getting stuck or going through the table.

You can see what I mean here:

As for the balls going through each other, I’ve upped the tick rate of the physics so give this build a try: https://playcanv.as/p/AYFvi9L6/

1 Like

thanks for your response.
but as I said there is no hope with ammo.js
because I spend a lot of my times to tweak and fix physics
I tried using CCD but not work so I removed it

you repeated this sentence again that “works fine”
I like to have a physics like this game
it’s perfect without any bug
please compare this game’s physics with ammo.js
then you will understand that ammo.js is bullshit

table model isn’t good I Just used free model I will change it
but I used Box collider for fixing that problem

I know about complex mesh collision but as you can see I can’t use basic collider for holes and it need exact collision detection so I used mesh collider

thank you for spending time to help me
I tried your version as you can see sometimes not work
please accept that ammo.js isn’t good




Raycasting isn’t good idea because I have many balls that I can’t check them because It will kill the performance

no sometimes physics not work
this is very important for me that always physics work
please compare this physics with ammo.js

1 Like

this game made with babylon.js
it’s very awesome
have good physics and realtime reflections

Having a look at the source, it looks like the developer has written their own physics system rather than using Cannon.js which is what Babylon integrates with.

Edit: Looking at the reflections, I don’t think they are real time, it just looks like a cube or sphere map on the materials as I can’t see reflections of the balls on each other.

Yes, but you can model a new collision mesh that is simpler.

You are currently in the scenario that you can either:

  • Integrate a different physics library and hope it works better
  • Try to fix the issues with Ammo (tweak CCD settings, tick rate and the collision mesh of the table)
  • Write your own physics
  • Try a different engine that has different physics integration that works better than PlayCanvas + Ammo for Snooker for you

Can you try this version? https://playcanv.as/b/n66WKtdZ/

I stripped completely down as much as possible so I can see what the collisions are, removed the table completely so we just have simple primitives for the moment and again, upped the physics tick rate.

How do I shoot? I’ve been trying to test it but can’t figure that out

@ Yohami_Zerpa

right click dawg,

i agree with the sentiments by OP, obviously ammo js is not perfect and you cant have box collider pool balls so that is not a good solution for everything.