Quantcast
Channel: Answers by "Hachley"
Viewing all articles
Browse latest Browse all 36

Answer by Hachley

$
0
0
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 all articles
Browse latest Browse all 36

Trending Articles



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