Hello.
I want to add a jump function, but whatever i do, it won’t work.
I’ve tried this:
if (Input.GetKey(KeyCode.Space))
{
rb.AddForce(Vector2.up * JumpForce, 0);
}
But it doesn’t work…
I don’t get any errors, but when i press Space, nothing happens…