Solution 1:
1) Add Physics Material and increase the bounciness.
2) Add rigidbody2D and set the drag to be 0 or 0.001.
Less drag you have, more bouncing time for the ball.
Solution 2:
1) Add rigidbody2D and set the drag to be 0 or 0.001.
3) check if the ball is touching the floor using OnCollision.
if it is touching the floor, add force to your object in y+ direction using rigidbody2D.addForce().
repeat when the ball lands on the floor again. It will keep repeating. To make it look realistic, you will have to adjust the drag.
Note: If your object is the Character Controller, then use
OnControllerColliderHit(ControllerColliderHit object) to determine what object the character controller is touching.
↧