Jump to content

  • Log In with Google      Sign In   
  • Create Account

HypnotiC

Member Since 04 Apr 2013
Offline Last Active Dec 17 2014 09:51 PM

#5054203 Basic Jumping and Gravity Implementation

Posted by HypnotiC on 17 April 2013 - 09:47 AM

I don't quite understand why you were bothered...

 

1) when user hit jump button, you can simply give velocity a positive y value, and everything else remains the same. 

 

2) I think you don't need to clamp velocity.y, but need to check for position.y so if you hit ground then velocity.y should be set to zero.

 

Do I understand your question correctly or completely wrong?




#5050456 Problem with Arcball/Trackball implementation using SDL + Opengl

Posted by HypnotiC on 05 April 2013 - 06:28 PM

I haven't known much about quaternions yet, but it seems that something is wrong with your rotation matrix multiplication:

Should    

      ball_new = ball_old * ball;

     ball_old = ball;

be 

     ball_new = ball * ball_old;

     ball_old = ball_new; ?

 

Since we are concatenating the newly constructed rotation to the accumulated rotation so far. 

(Seems ball_new is the accumulative rotation matrix)

 

 

 




PARTNERS