I don't know what's up. I usually do my jumping on the update function. This is my first big game though other than other prototypes or bad game attempts I've done.
This is my jump code
void FixedUpdate()
{
if (isDead == false)
{
if (Input.GetKeyDown(KeyCode.Space))
{
if (OnGround == true)
{
rb.velocity= new Vector2 (rb.velocity.x, jumpforce * Time.deltaTime);
}
}
}
}
I sometimes miss a few jumps on fixed update. But when I put it in my update function it jumps so low sometimes, like two or three times and then it launches me so high. It's just so random and weird. Is there anything I can do about this or will I just have to deal with fixedupdate? I even tried lateupdate if that matters.