2D physics jump issue.

Hey Guys,
Im having trouble with this 2D jump. When I jump next a platform it sometimes shoots up really high. From digging around I found that physics should be in fixedupdate but i cant put input in fixedupdate since some input gets lost so im kind of stuck as to how to fix this.

if((grounded /*|| !doubleJump*/) && Input.GetKeyDown(KeyCode.Space))
		{
			anim.SetBool ("Ground", false);
			r.AddForce(new Vector2 (0, jumpForce));

			grounded = false;
}

You’re completely fine using it in Update, but your code that you have shown failed to represent complete issue, so for now I can just point you in the right direction.

If your jumpForce variable is constant value (if not then well that’s why…) then the only possible problem from your code is the problem with grounded variable, more specifically - you set it somewhere to true before the player actually hits the ground and you just constantly keep adding force (pushing up) your player. For more detailed guidance we would need the code that sets your grounded variable to true as well as the order it is called and the place (e.g. if both in Update or…?)