In my project I have a ball with a PhysicsMaterial
where:
- Dynamic Friction and Static Friction both are 0
- Bounciness = 1
- Friction Combine is set to Multiply
- Bounce Combine is set to Maximum
This ball has a Rigidbody
attached in which:
- mass = 1
- drag and angular drag both are 0
- useGravity = true
In my scene there are some cubes which create a boundary for the ball to bounce inside. The ball bounces in a closed boundary. The problem is that over time the ball's maximum velocity keeps on increasing, and after some time it escapes the boundaries.
How can I prevent the velocity of this ball from exceeding a provided maxVelocity
?