hi thanks for the help, i watched the live training 2d about movement and jumping in unity and do the jumping stuff already but when the player jumps a few times suddenly he jumps to high, i read that the way to prevent this situation is to do the jump and then make the character wait a few seconds until he can do a jump again, so i tried with StartCoroutine this is the code:
////Jump Button
if (grounded && Input.GetButton ("Jump")) {
StartCoroutine("Jumping");
}
IEnumerator Jumping(){
GetComponent<Rigidbody2D> ().AddForce (new Vector2 (0, jumpForce));
anim.SetBool ("Ground", false);
yield return new WaitForSeconds (2);
}
I have the If statement in the FixedUpdate area. It does the jump but is not stopping any seconds it keeps continually.
then you would just add these two lines in that I’ve commented placement.
canjump = false //Line 14
yield return new WaitForSeconds(2);
canjump = true //On Line 18
Finally, You would check the canjump bool in your jump if statement, This is the best I can make out, as I’m not sure of any other code you have, but this is a quick fix regardless =)