I have a flat ground that is not tilted and a 3d sphere ball. The ball is bounced only in Y axis. I want that ball bounce in M shape as shown in uploaded picture.
I tried the following code:
rb2d.velocity = new Vector3(250f, 1f, 0);
and few others searching in the internet. None of them works.
To create a naturally bouncing object you can either use physics, move it with a script, or define its path with an animation.
The easiest is with physics: you need a SphereCollider on your ball and a Rigidbody, plus a bouncy physics material (bounciness about 0.5). The object on which it will fall should also have a Collider (but no Rigidbody), and mark it static to help the physics system. This should already work, but if you want to make sure that your ball does not roll away, set the Rigidbody constaints for x and z position.
Note that I have not used Mathfx.Bounce() this way and this code has not been tested, but it probably only needs a little tweaking to work.
Finally, with an animation you add an Animation component, create an animation clip, and create your custom bounce curve for the transform.position.y component. In my opinion this is the least natural way, but you have a lot of control how the bounce looks exactly.