+ 2
How do I make a jump look as realistic as possible?
I'm currently trying out 2D animation using the SDL and I was wondering how you can take gravity acceleration, time, weight and force into account to make a jump look very realistic. Unfortunatelly, I don't know much about physics. Does somebody with more knowledge in that field know how to implement this with a formula? Creating the jump animation itself is not a problem, I just want it to look really good.
2 Answers
+ 2
I insereted 2 of my codes that use physics. You could do something simmilar to make a jump look realistic.
Lines 13 to 16 (js part) in the gravity drop are the ones you can use.
https://code.sololearn.com/cKJ9au1K4F5y/?ref=app
https://code.sololearn.com/WhQNGm0xQ7R6/?ref=app
+ 1
Theresa i have quite some experience with that.
i say try learning vectors,not the actual maths stuff,how to create vectors i ln c++;
start with a simple code like...
(pls this is js,try converting it to c++)
class Vector{
constructor{
this.x=0;
this y=0;
this.velocityX=0;
this.velocityY=0;
}}
where x and y increases by vx and vy.try playing with that..
then keep adding more stuff,acceleration,force then gravity.
it takes time to learn,but its easy too.
creating a jumping effect in coding hardly requires any knowledge of the real life math stuff