I already have a paddle and ball in my pong game. How do I know if the ball coords "enter" the paddle's? Give example please!
I already have a paddle and ball in my pong game. How do I know if the ball coords "enter" the paddle's? Give example please!
Website(s): http://www16.brinkster.com/trifaze/
E-mail: [email protected]
---------------------------------
C++ Environment: MSVC++ 6.0; Dev-C++ 4.0/4.1
DirectX Version: 9.0b
DX SDK: DirectX 8.1 SDK
I'm not much help, but you porbably need to start asking about OpenGL or DirectX coding.
What type of object is the ball and paddle?
"Man alone suffers so excruciatingly in the world that he was compelled to invent laughter."
Friedrich Nietzsche
"I spent a lot of my money on booze, birds and fast cars......the rest I squandered."
George Best
"If you are going through hell....keep going."
Winston Churchill
Probably you have stored coordinates and sizes of ball and paddle rectangles. Check intersection of these rectangles. It doesn't matter whether you use IntersectRect () function or not. It is still pure and simple math.