:
That's done quite simple, by letting the players drag away from a specific point (in this case the sligshot tower) I can get the direction to shoot by inverting the way the player is dragging the Mudokon, so if you drag to the left, the direction to shoot is right, drag down, and the direction to shoot is up. Then I need to calculate what power to shoot with, and this can be done by measuring the distance between the center point and the mouse (withing pre-determined bounds so there is a max distance). I translate this distance to an amount of force, and add this force to the Mudokon, in the direction that I calculated.  And then we just have to watch and enjoy the Mudokon smashing into things! 
|
So you cheat and let it do all of the trig for you?
I need to give Unity a look.