I need some help. My breakout clone now has some collision detection function but I dont understand how it all fits together.
I have an ortho projection( -100 to 100 in all directions ) and my paddle is specified in a class in a different file. How does the vertex data get transferred to the ortho projection? The top polygon of the paddle is defined like this:
However when I try testing for collisions, they only occur around the origin as if the polygon was defined there, when it is being drawn at the bottom of the screen. I am lost as to how to rectify this situationCode ://top face coordinates top[ 0 ].setValues( -width/2.0, 2.0, -2.0 ); top[ 1 ].setValues( -width/2.0, 2.0, 2.0 ); top[ 2 ].setValues( width/2.0, 2.0, 2.0 ); top[ 3 ].setValues( width/2.0, 2.0, -2.0 ); flat[ 2 ].setValues( top, QUAD_POINTS );