Hi , i'm writing an orizzontal shot em up , and i need to write the enemy bullets routine.
My problem is how to calculate the direction of the bullet and make it go to this direction since is out of the screen.
I know the start position of the bullet (enemy position) and the destination (ship position) but i've not idea
how to transform into code for have the correct direction , and then transform in values to add or sub to the bullet position.
Can anyone help me pls ?
Thanks
My problem is how to calculate the direction of the bullet and make it go to this direction since is out of the screen.
I know the start position of the bullet (enemy position) and the destination (ship position) but i've not idea
how to transform into code for have the correct direction , and then transform in values to add or sub to the bullet position.
Can anyone help me pls ?
Thanks