I am new to game development. Currently I am working in simple game application, using GL_Line to draw a line and GL_Triangle strip to draw a (ball)image. Normally ball images are moving from left to right direction. When the user tab on a screen, then the line draw (top to bottom) inside the screen and to touch a ball image. So I tried to get the midpoint values from line and ball image, but i cannot know, how to start this?
If you have a line that goes from (ax,ay) to (bx, by), the mid-point of the line is just ((ax + bx) / 2.0, (ay + by) / 2.0)).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With