Hello, I am creating a small 2D arcade game and I have a problem with jump with just one keypress. My “hero” is rigidbody with collider2D… Example in the figure below.
Just … one press and jump up and right
Thanks for any help in advance.
Hello, I am creating a small 2D arcade game and I have a problem with jump with just one keypress. My “hero” is rigidbody with collider2D… Example in the figure below.
Just … one press and jump up and right
Thanks for any help in advance.
rigidbody2D.AddForce((transform.up * jumpHeight) + (transform.right*jumpDistance));
Have you tried something like that? jumpHeight and jumpDistance are just floats that you define.
Thanks for the replies but none of them unfortunately helped.
Ball jumps a little to the side and then just up