At the risk of getting my proverbial hands slapped; here is the source for an old DOS game that used to ship with DOS 5.0 back in the day. It's called "Gorillas" (bringing back some memories of you old-timers?) and it has the same type of functionality that you are looking for.
While I can't explain the code, the premise is this: Each player gorilla throws bananas at each other. At launch, the game takes the player's X,Y coordinates, Angle of throw and velocity to calculate an angle of trajectory (considering wind-drag/gravity).
Sounds exactly like what you are looking for (except maybe inverted). I found this code online - not sure where - but back in the early 90's it was shipped with MS-DOS as a sample QBasic program.
Google "Gorillas QBasic" and you can find the full source file if you want it as a reference because this snippet only shows the relavent function: PlotShot()
' Plots banana shot across the screen
'Parameters:
' StartX, StartY - starting shot location
' Angle - shot angle
' Velocity - shot velocity
' PlayerNum - the banana thrower
FUNCTION PlotShot (StartX, StartY, Angle#, Velocity, PlayerNum)
Angle# = Angle# / 180 * pi# 'Convert degree angle to radians
Radius = Mode MOD 7
InitXVel# = COS(Angle#) * Velocity
InitYVel# = SIN(Angle#) * Velocity
oldx# = StartX
oldy# = StartY
'draw gorilla toss
IF PlayerNum = 1 THEN
PUT (StartX, StartY), GorL&, PSET
ELSE
PUT (StartX, StartY), GorR&, PSET
END IF
'throw sound
PLAY "MBo0L32A-L64CL16BL64A+"
Rest .1
'redraw gorilla
PUT (StartX, StartY), GorD&, PSET
adjust = Scl(4) 'For scaling CGA
xedge = Scl(9) * (2 - PlayerNum) 'Find leading edge of banana for check
Impact = FALSE
ShotInSun = FALSE
OnScreen = TRUE
PlayerHit = 0
NeedErase = FALSE
StartXPos = StartX
StartYPos = StartY - adjust - 3
IF PlayerNum = 2 THEN
StartXPos = StartXPos + Scl(25)
direction = Scl(4)
ELSE
direction = Scl(-4)
END IF
IF Velocity < 2 THEN 'Shot too slow - hit self
x# = StartX
y# = StartY
pointval = OBJECTCOLOR
END IF
DO WHILE (NOT Impact) AND OnScreen
Rest .02
'Erase old banana, if necessary
IF NeedErase THEN
NeedErase = FALSE
CALL DrawBan(oldx#, oldy#, oldrot, FALSE)
END IF
x# = StartXPos + (InitXVel# * t#) + (.5 * (Wind / 5) * t# ^ 2)
y# = StartYPos + ((-1 * (InitYVel# * t#)) + (.5 * gravity# * t# ^ 2)) * (ScrHeight / 350)
IF (x# >= ScrWidth - Scl(10)) OR (x# <= 3) OR (y# >= ScrHeight - 3) THEN
OnScreen = FALSE
END IF
IF OnScreen AND y# > 0 THEN
'check it
LookY = 0
LookX = Scl(8 * (2 - PlayerNum))
DO
pointval = POINT(x# + LookX, y# + LookY)
IF pointval = 0 THEN
Impact = FALSE
IF ShotInSun = TRUE THEN
IF ABS(ScrWidth \ 2 - x#) > Scl(20) OR y# > SunHt THEN ShotInSun = FALSE
END IF
ELSEIF pointval = SUNATTR AND y# < SunHt THEN
IF NOT SunHit THEN DoSun SUNSHOCK
SunHit = TRUE
ShotInSun = TRUE
ELSE
Impact = TRUE
END IF
LookX = LookX + direction
LookY = LookY + Scl(6)
LOOP UNTIL Impact OR LookX <> Scl(4)
IF NOT ShotInSun AND NOT Impact THEN
'plot it
rot = (t# * 10) MOD 4
CALL DrawBan(x#, y#, rot, TRUE)
NeedErase = TRUE
END IF
oldx# = x#
oldy# = y#
oldrot = rot
END IF
t# = t# + .1
LOOP
IF pointval <> OBJECTCOLOR AND Impact THEN
CALL DoExplosion(x# + adjust, y# + adjust)
ELSEIF pointval = OBJECTCOLOR THEN
PlayerHit = ExplodeGorilla(x#, y#)
END IF
PlotShot = PlayerHit
END FUNCTION
I hope this helps!
JTK