I want to do is I want to give curve to ball. Can I enlarge this rigidbody.AddForce(transform.forward * 20f, ForceMode.Impulse); line with any parameters in order to give curve to the ball?
You can simulate a curve by adding another force 90 degrees to the ball’s course, perhaps adding something like:
// which way we going?
Vector3 travel = rigidbody.velocity.normalized;
// which way is dead-aside (left in this case I think?)
Vector3 perpendicular = Quaternion.Euler( 0, 90, 0) * travel;
// add a small force that way... make it bigger to curve more
rigidbody.AddForce(perpendicular * 2f, ForceMode.Impulse);