rigidbody velocity c# unity code example
Example 1: unity how to set rigidbody velocity
Vector3 velocity = new Vector3(10f/*x*/, 10f/*y*/, 10f/*z*/);
GetComponent().velocity = velocity;
Example 2: rigidbody velocity c# unity
//for rigidbody2D
GetComponent().velocity =new Vector2(40,0);