Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 04 Apr 2013
Offline Last Active Sep 21 2016 01:29 PM

#5200878 Collision Detection Problem with Scale,Rotate,Fast Object

Posted by on 30 December 2014 - 03:38 PM

For rectangle and triangle collision detection,

I think you don't really need to calculate the edges. You can simply check whether or not any of the 3 vertices of the triangle is in the rectangle. If yes, then it's a collision.

This method is simpler and faster, which may also solve your problem no.3 maybe?

#5054203 Basic Jumping and Gravity Implementation

Posted by 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 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:


      ball_new = ball_old * ball;

     ball_old = ball;


     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)