# Double Jump causing problems?

Here is my code. I have an empty Gameobject directly underneath the child with a small radius checking the ground every thing seems to be correctly covered, but for some reason the jumping mechanic is very finicky and broken feeling. Can you take a look a tell me what you see? Thank you for your time!

public class PlayerMovement : MonoBehaviour
{

public float speed;
public float height;

public Transform groundCheck;
private bool grounded;

private bool doubleJumped;

// Update is called once per frame

void FixedUpdate ()
{
if (grounded)
{
doubleJumped = false;
}

if (Input.GetButton ("Horizontal"))
{
transform.Translate (Vector3.right * speed * Time.deltaTime);
}

if( Input.GetButton("Left"))
{
transform.Translate (Vector3.left * speed * Time.deltaTime);
}

if (Input.GetButton ("Jump") && grounded)
{
//transform.Translate (Vector3.up * height * Time.deltaTime);
Jump();
}

if (Input.GetButtonDown ("Jump") && !doubleJumped && !grounded)
{
Jump();
doubleJumped = true;
}

}

void Jump()
{
transform.Translate (Vector3.up * height * Time.deltaTime);
return;
}
}


This should probably just be the issue because you're using FixedUpdate() instead of Update(), thus the groundcheck / jumpcheck, doesn't happen every frame, but every physics update, try changing that and it should be fixed.