I have several spheres inside planes, and I used AddForce and AddTorque to let them move and bounce each other endlessly. I have their Drag and Angular Drag equal to Zero, and no Gravity, but they will still eventually stop moving or rotating after they hit the planes. How to prevent this?
2 Answers
2Fortunately the answer is simple. It is likely that if you adjust the physic material
you will find the result you’re looking for.
You would have to drastically clarify how and why you are adding force, and incliude screenshots of your setup and physicMaterial.
Anyway I can attach better result when I create my own physic material, thanks for the tips However, after trying, even I set Dynamic friction and static friction to 0, and bounciness to 1, the spheres will stop sometimes or move faster and faster sometimes.
– fanling3Hi Fattie, I thought your answer solved my question but after trying, the result is still not exactly what I want, I have modified my comment, please take a look. Thanks so much!
– fanling3What I mean by "didnt use physic material" is that the parameter "Material" under the collider of spheres and planes is "None (Physic Material)" This is what I did before asking this question. And after seeing your answer, I created a new physic material with Dynamic friction and static friction to 0, and bounciness to 1, the spheres still stop eventually. About AddForce, I used this function in Start(), and leave them alone, hoping them to move continuously when no friction between collisions. After I change AddForce(xxx) into rigidbody.velocity = xxx, it seems work
– fanling3I guess the problem comes from bounce threshold as the default value is 2. There is energy loss when some of the spheres have velocity lower than 2.
– fanling3I had similar problem. The solution worked for me is to set Collision Detection to Continuous.
Are you using a Physic Material? Try modifying the friction variables. Or you could write some code that adds additional bounce on collision.
– AlucardJayI didnt use any physic material, adding additional bounce may make them odd when they bounce >100 times each other. I want them to keep moving and rotating at constant speed
– fanling3