Quantcast
Viewing latest article 2
Browse Latest Browse All 4

Answer by christoph_r

How about this? function Update () { if (CFInput.GetKey(KeyCode.W) && transform.position.y <15) { rigidbody.velocity.y = speed; } else if (CFInput.GetKey(KeyCode.S) && transform.position.y > 7) { rigidbody.velocity.y = speed *-1; } else { rigidbody.velocity.y = 0; } }

Viewing latest article 2
Browse Latest Browse All 4

Trending Articles



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