Quantcast
Channel: Answers by "XenoTracker"
Viewing all articles
Browse latest Browse all 6

Answer by XenoTracker

$
0
0
Apparently this is the new AddForce thing Public float jumpSpeed = 5f;//or whatever you want it to be public Rigidbody rb; //and again, whatever you want to call it void Start (){ rb = GetComponent (); } Void FixedUpdate(){ if(Input.GetKey (KeyCode.Space)){ rb.AddForce(Vector3.up * jumpSpeed); } } and in the inspector just drag the Player game object from the hierarchy to the rb slot in the script and you're good :3

Viewing all articles
Browse latest Browse all 6

Trending Articles



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