My character is not jumping constantly.
Sometimes it is jumping higher and sometimes it is jumping very low.
What could be the problem?
void OnJump(InputValue value)
{
if(value.isPressed)
{
float jumpAmount = jumpSpeed * Time.deltaTime;
myRigidbody.velocity = new Vector2(myRigidbody.velocity.x, jumpAmount);
}
}