- Home /
Mesh collider and jitter
Hello all.
I am building a pool game and I decided to use unity's Physx engine for the game's physics.
I have made the pool balls rigid bodies with spherical colliders.
When I use a mesh collider for the pool table bed (slate), the balls bounce up and down into random directions, even if I apply the slightest force on them. I've given the pool balls their official mass (170grams) and dimensions. I get the same result regardless of the "Smoot Sphere Colliders" setting. If I replace the mesh with a box collider, the balls roll smoothly on the table bed. However, I need the mesh collider because the table bed has the pocker holes on it and a box collider covers them.
I'm really a newbie to Unity so any kind of help would be greatly appreciated!
Answer by Ingen · Aug 04, 2012 at 02:14 AM
surround the hole with 3, or more, small box and use long box to cover the rest of table side, think could go?
Hello Ingen and thanks for the reply. $$anonymous$$y problem is not with the table side but with the table bed / surface. I also need the maximum accuracy around the table's pockets, that's why I ended up with the mesh collider. After all pool is a game of accuracy.
sorry my English is not so good
Have you try to set "convex" at the mesh?
You could put a sphere trigger at the hole ins$$anonymous$$d a physic hole, but lost buoyancy inside the hole, and a bit of accuracy
maybe... with OnTriggerStay, and set a $$anonymous$$imum time to stay in trigger before apply the function for ball in hole, but don't know if is possibe
Thanks again Ingen. Yes, I've used the Convex setting as well but saw no change. The balls have the same erratic behaviour. Only the box collider eli$$anonymous$$ates the "randomly bouncing ball" problem but it introduces tons of others. I was hoping that PhysX engine is what it's name suggests but it seems it was not designed for building games where accuracy and realism is a key factor. I will give your suggestion a try but it seems that I'll be dropping unity engine entirelly and migrate everything to UD$$anonymous$$.