Quantcast
Channel: Answers by "khenkel"
Viewing all articles
Browse latest Browse all 47

Answer by khenkel

$
0
0
You need to modify the entire velocity variable. x, y and z are read-only. Nonetheless it is not recommended to modify the velocity variable. You should use Physics stuff instead, like AddForce(). http://docs.unity3d.com/ScriptReference/Rigidbody-velocity.html rigidbody.velocity = new Vector3(rigidbody.velocity.x, speed, rigidbody.velocity.z);

Viewing all articles
Browse latest Browse all 47

Trending Articles



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