The rigidbody object moves with this script:
void Update() { if (Input.GetKeyDown(KeyCode.Space)) //если нажат пробел rb.velocity = new Vector3(1, 0, 0); I need when: if (Input.GetKeyUp(KeyCode.Space)); change direction, speed.
I try this: rb.velocity = new Vector3(5,-1 0, 0); - the object accepts this command in the first case.
Tried through rb.useGravity = false/true , the object does not move at all. how to do it?