throwing a bomb

Blitz3D Forums/Blitz3D Programming/throwing a bomb

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Hi. I recently managed to chuck a bomb in an arc, with a trajectory. My problem is it only throws directly north. I would like to through it in the direction I am looking.

The trajectory is calculated using GG_curves_3d(a fantastic piece of code) where you plot in at least 5 x,y,z co-ords and the trajectory is mapped.

So, has anyone a math routine to resolve something like:

1. My man is at x,y,and z of 3,3,0 and is looking due east.
2. Start position of bomb will be 3,3,1 and end position 8,3,1 (thrown within an arc)
3. Man turns north, still at x,y and z of 3,3,0 throws bomb but this time the destination of bomb's arc will be 3,8,1.

If anyone can shed some light on the syntax to resolve what way I'm facing, and subsequently extrapolate a destination co-ord for the bomb ? I've a sneaking suspicion I might need to use polar co-ords or j-notaion however it's been about 18 years or so since I last used that math. I store the data regarding the 5 x,y and z co-ord within an array, for population.

My next step will be to add a 'force' factor to the melt which will factor up the arc and the distance the hand thrown bomb goes. B3D Rocks (;-)

Thanks in advance, Blitzplotter.