Quantcast
Channel: Questions in topic: "addforce"
Viewing all articles
Browse latest Browse all 1264

Added force occasionally get multiplied 3x

$
0
0
I don't know what's the cause of this but here's my code occasionally that force gets multiplied 3x causing my character to go off screen. private void FixedUpdate() { if (gamOver) return; if (onGround && (Input.GetAxis("Jump") > 0)) { myAnim.SetBool("onGround", false); myRB.AddForce(new Vector2(myRB.velocity.x, jumpForce)); } } I'm doing this on a rigidbody2d. I don't know what I'm doing wrong.

Viewing all articles
Browse latest Browse all 1264

Trending Articles



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