How to calculate direction from initial point and another point?
- by Dvole
I'm making a simple game where I shoot things from a certain point on screen (A).
I tap the screen and shoot the projectile from initial point(A) to the tap point(B).
But I want the projectile to move along the same path instead and fly out of bounds of the screen.
How do I calculate a point that is on the same line that these two points, but further away?
This is a simple math, but I can't figure it out.