Yeah, remember the X Y Z sequence, so the (0,0,1) means 0x 0y 1z.
If you'd like the code to affect the Y only, then try something like:
rigidbody.velocity = transform.up * Input.GetAxis("Vertical") * speed * Time.deltaTime;
Or if you want it to affect both Y and Z, then:
var there : Vector3(1,0,1);
rigidbody.velocity = transform.there * Input.GetAxis("Vertical") * speed * Time.deltaTime;
↧