I have recently came very very close to making the gameplay style I want but I stumbled into a small problem. I need the distance between two objects counted by the pixel. At first it seemed easy but I soon realized I didn't know what I was doing. Does anyone know how to do the distant formula in c++. I need the distance between two separate objects for my collision detection to work to my liking. The objects are the size of pixels by the way.
I tried using a for loop to figure out the distance but the second object of the 2 moves around and the for loop only activate when the second object triggers it moving away from the first object. If it get closer after activating the for loop the distance will not be checked.
Edited by LAURENT*, 25 August 2014 - 12:23 PM.