0
\$\begingroup\$

I am making a simple breakout game. I have added bounce physics to the ball and to the bricks. When the ball collides with the bricks, the speed of ball slows down. I want ball to maintain its speed to what I set it to intially.

\$\endgroup\$
2
  • 1
    \$\begingroup\$ What have you tried? Why didn't it work? Show your relevant code. We can't guess what's going wrong. \$\endgroup\$ – Tyyppi_77 Jun 4 '16 at 12:11
  • \$\begingroup\$ Is there a way of changing speed of the ball at any time? I want to change the speed after collision. \$\endgroup\$ – Mazim Arif Jun 4 '16 at 12:35
1
\$\begingroup\$

Set the new Physics Material on the object you are colliding with. Make sure you set the friction to 0.

http://docs.unity3d.com/Manual/class-PhysicMaterial.html

\$\endgroup\$
1
  • \$\begingroup\$ Done already. Speed is still changing. \$\endgroup\$ – Mazim Arif Jun 4 '16 at 12:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.