Quantcast
Channel: Answers by "podmaster"
Viewing all articles
Browse latest Browse all 30

Answer by podmaster

$
0
0
I'm not sure what the problem is, sorry i can't run tests right now. But if you are trying to make your ball jump, i would use AddForce() http://docs.unity3d.com/ScriptReference/Rigidbody.AddForce.html And instead of checking if it's jumping, i would check if it is grounded and only execute the Jump(AddForce) Code block when it IS grounded so it will not constantly addForce(). The instructions would be: //IF JUMP KEY IS PRESSED // ADD FORCE AND SET GROUNDED TO FALSE //IF THE BALL TOUCHES THE GROUND 'OnTriggerEnter' //SET GROUNDED TO TRUE

Viewing all articles
Browse latest Browse all 30

Trending Articles



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