So I am currently working on a very simple project, a bubbleshooter type of game where you have a launcher in the bottom center of the screen with a balloon floating atop. The launcher shoots a ball at the balloon, balloon pops and a new balloon is randomly placed on screen. I am fairly new to programming, currently in my 2nd term of college, so a program like this is not standard for me. The biggest problem I am having is the motion of the ball coming from the launcher, the launcher can rotate 180 degrees, from 1 end of the screen to the next. If my lauchner is 90 degrees, facing straight up, i know that all I have to do is decrease y-axis in order for it to shoot straight, but what if my angle is more complex than that? How can I insure that movement will be precise? This is the most difficult part for me, if anyone can help I would really appreciate it. Also when my launcher moves, it will be an increment of 5 degrees per keyPressed (0, 5, 10, 15... 180).
Thank you.