I am currently working on a 2D Game with square bitmaps that move over the androidscreen. The corners and edges of the bitmaps are transparent, in the middle you see a frog
. Now I am faced with the collision calculation, so that the frogs must stop after contact with other frogs. But I have a problem to calculate the collision after using the function rotate(). I need rotate(), to turn the frogs to the direction they are looking. To calculate a collision with horizontal bitmaps is easy:
int firstXRangeStart = x_Coordinate;
int firstXRangeEnd = firstXRangeStart + widthBitmap;
But does somebody know how to perform a collision calculation when bitmaps are not just horizontal, because they are rotated through an angle? At the moment I use always a horizontal BoundingBox. But this is very unexact.
Thank you very much
Duckemai



