You know when you tilt the controller in smash bros. the character runs depending on how fast you move the stick. I’m having a spot of trouble getting the velocity calculations.
You need to use the magnitude of the input Vector. That is always positive and therefore returns how much you moved the joystick from its center:
input = new Vector3(Input.GetAxis("Horizontal"), 0, Input.GetAxis("Vertical"));
float t = input.magnitude;
if(t > 0)
rb.AddForce(input * t);
Multiply your velocity calculations by the joystick input value(which if you have it set up right in the input settings in your project settings should be somewhere between 0.0 and 1.0
In js with a rigidbody player object something like this :
rigidbody.AddForce (vForward * fShip_Speed * Input.GetAxis("Vertical"));
vForward is my Vector direction variable, fShip_Speed is the maximum speed I want my Ship to move at, Input.GetAxis(“Vertical”) is the modifier of the max speed via the joystick input.
Maybe I interpreted it the wrong way. Let’s say I wanted to move the analog stick a certain speed to throw (for example) a ball at a certain strength.