Hello,
I am trying to get my character to jump a specific height using velocity and gravity.
Gravity is currently set to X:0,Y:-20
But, what is gravity? does the -20 mean it is applying a -20 unit velocity per second? This is all I can assume.
Anyway, to keep it simple, lets say I want to jump up 10.0 units. By this, I mean, from the character’s position on the ground, to the peak of his jump, he should have moved 10.0 units.
However, I am pretty bad at the maths. So, gravity is -20 units, I need to peak a jump at 10 units. What velocity would I require?
rigidbody2D.velocity = new Vector2 (0, What goes Here?);
Of course, I am after the equation required, not just the number for 10 units. The character would need to jump 2 units, 5.5 units, 34.44 units, etc.