http://GameProgrammer.Com

Programming

GP Mailing List
     Thread Index
     Date Index

ATXGPSIG List
     Thread Index
     Date Index

Google
>

Home

TheGrumpyProgrammer



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gameprogrammer] Circle - Rectangle collison detection



Hi,
I am writing a (2D) arkanoid clone & I am having some problems with collison detection. The problem I am facing is that The ball has a tendency to pass by the corners of the bricks without colliding, although a slight overlap is quite clearly visible.

The method I am using is follows:
I have two points (a) the point at the centre of the ball & (b)the point at which ball will be in future.

Now I calculate the equation of line between these two points & then check for intersection with four lines comprising a square.

Any suggestions/ alternative methods/ pointers to web resources will be appreciated.

Thanks in advance,
Pallav Nawani




---------------------
To unsubscribe go to http://gameprogrammer.com/mailinglist.html