Randomly moving balls around table....

hey friends…
I’m trying a game in which no. of balls will come up at random position on plane will collide at boundaries decided by cubes.
I’m uploading a test project.
in this, I want velocity of the balls to be constant and also will reflect to boundaries as per collision…I tried many things but cant seem to find answer…
Please see any one can help me with this…
I’ve seen plenty of smart people with good physics on community…Please help me out with this…
thanks in advance…

171957–6180–$test_899.rar (1.18 MB)

hey sry i got the ans…
i jst added the physics material with 0 friction and max bouncyness

hey frends sry but its giving problem…
again to my 1st post…plz help

Do y thnk tha lettng ou lettrs s a col wrtng stle? t mkes t hard t read a’d not mkng m wnt t nswer.

see if this helps…

It helps! :slight_smile:

Ok here we go. The problem is the same as described here:

http://forum.unity3d.com/viewtopic.php?t=27380&highlight=perfect+bouncing+ball

I tried to archieve a perfect bouncing ball that never looses energy, but the physics engine spits in between as the ball gets more and more velocity each bounce even if drag is set to zero and bouncyness set to 1. What you need to do is the solution described in the thread above, overwrite the velocity each time a collision occures.

In your case of bouncing ball you have to look at only velocity in one axis +y …
but if u see in my project velocity will be +/- X n +/- Y axis…
and after every collision one or both velocities will change.

Right, you could detect the collision normal and according to that invert the corresponding axis velocities by multiplying them with -1. Just a guess, but should work.

hmm…
still facing problem.