Make bullets fire in a specific direction.
You can kinda think of this as part 2 of This Question.
So first of all, I would like to point out that the question is kind of unspecific. And I am too lazy to make a repl explaining it. I would put pictures instead.
Can anyone tell me how to make the bullets fire off away from the cannon instead of to your mouse.
What you need to do is calculate the point which is the same distance in the direction modified from the direction towards the mouse cursor. In your code, you are already calculating the start and end points of the cannons, and so you simply need to extend this by modifying the formula.
Side Note: I only briefly read the site you sent to me (as I no longer need support on this question), yet all I was able to find is about fires. Do you have a more specific link?