I am developing a game and came to a problem that couldn't solve yet. In a given scenario, an opponent shoots at a target in a 2D environment. At the beginning, all that I got is only the position of the enemy (say, (Ex, Ey)) and of the player (Px, Py). With this I can find the tangent of the angle that the line forms with the X axis (let's say, alpha angle). This 'bullet' moves in the screen by 40 pixels per frame, let's say... In the game logic, I have to update the bullet's X and Y (Bx, By) at each frame in a given value based only on those points and angle. In the picture, the position of the bullet at each frame is in Red. If I got the alpha angle between the hyphothenusa and the X axis would be very easy to find the Delta X, Delta Y I have to add at each frame to (Bx, By). But I couldn't. How to solve this problem? Thanks in advance.
Notice: the Y axis in the computer screens grows in the opposite direction
