This is a simple shoot-the-target type of a project I did to experiment with physics equations. Feel free to modify/use the code for your project. Gun points towards mouse cursor. The velocity is based on the distance between the gun and the cursor. Click to shoot. Try to hit the red line directly with the bomb. When it is hit, it will accelerate.