There must be something wrong with something else in my code because that still doesn't work. Actually I'll compile a win vs so you can see what I mean.
/edit
this is the working one with the...
Type: Posts; User: caffeinated
There must be something wrong with something else in my code because that still doesn't work. Actually I'll compile a win vs so you can see what I mean.
/edit
this is the working one with the...
Mmm.. still isnt helping... this is a cleaned up version of my original check..
if( (leftA <= widthB) && (topA >= topB) && (bottomA <= bottomB) )
{
return 1;
}
if( (leftA >=...
Ok, that makes a bit more sense, I was wondering why text was so hard to line up.
a.x + a.w; // thats the right side btw
a.y - a.h; // thats what i use for the bottom..
anyways, you mean I should do something like this..
if (A.x <= (B.x + B.w) && A.y >= (B.y + B.h) )
...
Im working on a collision system for a simple pong game and I'm having some troubles..
this is my collisionCheck()
int collisionCheck(SDL_Rect A, SDL_Rect B)
{
//The sides of the...