I am working on a simple Pool game using Unity. The problem is that the physics engine seems to be struggling with working with small objects.
I currently have the balls scaled to be 0.1 in the x, y and z. The problem is that they appear to slightly sink into the pool table and when I apply force to them, they move across the table and then stick to the table edges - again appearing to slightly sink into them.
Is there a problem with the physics engine getting confused with very small objects?
I originally tried using much larger objects, but they didn’t move effectively
Neither does making the bounch threshold lower. Although if I make it less than 1.4 when I apply a force to the ball to make it move, it goes flying off the table!!
Just tried the time step - unfortunately it doesn’t make a difference. The wierd thing is that even if I project a ball at an angle onto the side cushion - it still appears to stick to it, whilst sliding along the egde of it.
I had similar problems with my dice game - I’ve created a collider larger than the visible object which creates new problems when dice (or in your case balls) are laying directly beside each other (or better will never) - I think later I switched to a combination of an higher invisible ground and made the larger colliders a little smaller than before and it was OK.
“I currently have the balls scaled to be 0.1” This scale is aplied in the import mesh settings, or in transform settings? As I remember, people ask to do this kind of adjustment in the import settings.
how they are imported and what they are is of no importance as you really want to use sphere colliders in this case as you need the mathematical precision of the sphere col collision. You can’t afford to lose it for the sake of being a magnitude slower and less precise by using mesh colliders for example
My soon to be released game uses Unity physics engine with only a few minor scripts to adjust some behavior. I spent quite a bit of time tweaking settings to get reasonable performance/behaviour combination.
I’d suggest sticking some GUI elements on the screen that let you dynamically change physics/time/material/collider settings.
This way you can quickly try all kinds of settings.
I asked how they are created, but meant to add to check that sphere colliders are being used, and to check that the colliders are the same size as the object. Highlight a ball in the Hierarchy view and look at it in the scene view. Does the highlighted collider look to match the surface of the ball?
HI, To avoid collision problem , set rigidbody Collision Detection to Continuos or Continuos Dynamic, it will overcome collision problem! [quote=“anon_70257666, post:1, topic: 416396, username:anon_70257666”]
Hi,
I am working on a simple Pool game using Unity. The problem is that the physics engine seems to be struggling with working with small objects.
I currently have the balls scaled to be 0.1 in the x, y and z. The problem is that they appear to slightly sink into the pool table and when I apply force to them, they move across the table and then stick to the table edges - again appearing to slightly sink into them.
Is there a problem with the physics engine getting confused with very small objects?
I originally tried using much larger objects, but they didn’t move effectively