When I use the gamepad/joystick, the character moves correctly, at expected velocity.
When I use the keyboard, it's ok only when I press one key at a time, but...
Once I press the keys down + left, or up + right, for example, **the character moves much faster than normal**.
float moveHorizontal = Input.GetAxis("Horizontal");
float moveVertical = Input.GetAxis("Vertical");
Vector3 movement = new Vector3(moveHorizontal, 0, moveVertical);
rigidbody.AddForce (movement * speed * Time.deltaTime, ForceMode.VelocityChange);
Any clues as to what could be causing this unwanted speed?
Again, the gamepad works perfectly for some reason, only the keyboard causes this error. I imagine someone may have encountered this also as it is based on the Roll-A-Ball tutorial project. Thank you for any ideas on this.
↧