I'm drawing a laser fired from a ship like this:
//endPoint = ending X value of line(right edge of stage)
//shipX & shipY = laser start coordinates(starts from ship location)
It fires from left to right.
I also have moving targets on my stage that move from right to left.
Is there any property or method I could use to check the X & Y coordinates of my laser(line) to see if its "hit" a target?
Somehow, I need to get the X value of the laser, and see if it equals the first X value of the target that it encounters. If they equal, then I have a "hit".
Any thoughts or ideas on how to best accomplish this?