Quantcast
Viewing latest article 10
Browse Latest Browse All 36

Answer by Hachley

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;

Viewing latest article 10
Browse Latest Browse All 36

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>