Cannon Example

4.5
Your rating: None Average: 4.5 (2 votes)
Difficulty Level: 
Advanced
Topic: 
Game Coding

Ok, I have created this example to show how to create a cannon which can shoot at an angle with a varying strength.

The physics on the "Kitty" that is fired from the cannon I didn't spend much time on so it's pretty rubbish, but the cannon firing and working out how to move the Kitty is the important part!

I set a value for X speed and a value for Y speed on the Kitty, so you can make use of that to code your own Kitty physics! I might update this example later to improve it but I hope this helps some people for now!

Download example file

Comments

Game_Master's picture
5

Yay, perfect! Thanks KlikMaster!