- Home /
Set minimal speed
I want the ball to move with certain minimal speed with every little move but saving the ability to accelerate. So i've changed:
GetComponent<ConstantForce>().force = new Vector3 (Input.GetAxis("Mouse X")* speed, 0f,Input.GetAxis("Mouse Y") * speed);
to
GetComponent<ConstantForce>().force = new Vector3 ((Input.GetAxis("Mouse X")+ speed2) * speed, 0f,(Input.GetAxis("Mouse Y")+ speed2) * speed);
But it don't work. The ball starts moving between two points and i can't control it anymore. I guess both "+ speed2" are counted in both X and Y axis EVEN when i don't make any move yet.
How to fix it?
Comment