unity change rigidbody velocity code example
Example 1: unity how to set rigidbody velocity
Vector3 velocity = new Vector3(10f/*x*/, 10f/*y*/, 10f/*z*/);
GetComponent<Rigidbody>().velocity = velocity;
Example 2: change character velocity unity
transform.position -= new Vector3 (4f, 2f, 0f);