Currently working on a game with some others, but for reasons I don’t understand the jump height seems to differ on each of our computers. On my computer it looks good, but on other computers he’s flying up in the air instead of jumping. Any ideas are appreciated!
This is the function I use for jumping.
private void Jump()
{
rb.AddForce(new Vector3(0, jumpHeight, direction * speed * Time.fixedDeltaTime * 100));
}
This function is called in FixedUpdate() from this if statement.
if (Input.GetKeyDown(KeyCode.Space) && grounded == true)
{
Invoke("Jump", 0.2f);
}
The movement speed seems to vary too, just not as much. This is controlled by this.
rb.velocity = new Vector3(0, rb.velocity.y, direction * speed * Time.fixedDeltaTime * 100);