Hello lovely people, i have started the "Beginner C++ Game Programming DirectX" series with the hope i'll learn enough programming to make my long planned mobile game. i'm stuck at tutorial 8 having this question:
1) I can't understand why this part of the code works in the "bool IsColliding(int x0, int y0 etc)" function:
return
right0 >= x1 &&
x0 <= right1 &&
y0 <= bottom1 &&
bottom0 >= y1;
shouldn't true be returned when the face is in the centre of the poo (when all conditions are true)?
minute: 10:03?
video: https://www.youtube.com/watch?v=7yqV2hyv9Cc&t=1373s
PS: yes, i gave up on programming a while ago becouse i had to learn for university and i'm back for some action + now i have a goal with programming, making my own mobile game. i know these tutorials aren't for mobile programming but they're great for learning programming, exactly what i want. The homeworks are reallly good challanges that many tutorials lack, thanks chilli
HELP --> noob questions :)
Re: HELP --> noob questions :)
no, check this out
As you can see, all conditions are true in this example.
Note that in this example all conditions are the same and in the same order as you posted. I just wrote "Top" instead of "y" etc for clarity
As you can see, all conditions are true in this example.
Note that in this example all conditions are the same and in the same order as you posted. I just wrote "Top" instead of "y" etc for clarity
Re: HELP --> noob questions :)
flawless explanation, guess i should've drawn it, thanks
Re: HELP --> noob questions :)
Haha, I was just going to suggest that, but I must have forgotten to hit the fuckin submit button.
When in doubt about stuff like this (spatial stuff), draw a picture
When in doubt about stuff like this (spatial stuff), draw a picture
Chili