hi i’m currently working on my simple pool game but i have a problem with the collider
In my Unity pool game, I’m experiencing an issue with the colliders where the billiard ball bounces off the table edge only a few times, but at a certain speed, it stops bouncing and just rests against the edge. I’ve tried various solutions, such as using continuous collision detection, adjusting the drag and friction settings, and tweaking the velocity, but the issue persists. The ball continues to move but remains stuck to the edge of the table instead of bouncing away. What could be causing this, and how can I ensure that the ball behaves as expected and continues bouncing, regardless of its speed?
does anyone know what’s the problem?
Are you moving the ball in Update() or FixedUpdate()? It’s possible for colliders to get stuck in other colliders, especially if they are moved in Update()
i have a function to fire the ball it’s in update, what should i do then?
It’s hard to say for certain without seeing code. But generally speaking anything that has colliders or rigidbodies should process their movement in FixedUpdate().
If you’re using the default Physics Material on your rigidbodies, that can sometimes lead to less than ideal results. For this, I’d try using a physics material on the table where the bounciness is 0.3 while the ball has one that’s about 0.9. Those values are mostly me vaguely remembering what values I used for a simple pool game I made ages ago, mind, so tweak to your liking.
i have tried various combination of bounciness on the table and the ball but at certain speed the ball still stick to the table, like it does bounce a few times but at certain speed the ball stick to the table and still moving it makes the ball go in so easily because its stick to the table when it suppose to bounce at that speed
Hm.
This is a bit of a hack, but try setting the friction combine on your ball to minimum and then put some 0 friction colliders along the table’s edges. I’m not sure this will work, mind.