Hello everyone!
I’m trying to script a game mechanic where a tank will shoot a cannon ball, there are two variables which is the shooting angle and shooting power. I want to make the cannon ball curve like an arc with regards to the shooting angle and shooting power.
Now, it is quite easy to do this using Unity built in phsyx engine. But the problem is, having the game style is cartoony one, I want to use a vector approach. I was thinking that the angle will determine how much is the elevation while the power will gives the distance. So it is just a simple arc that I wanted the cannon ball movement to be. I’m really not used to coding using trigonometry. Anyone has any hints about this?
I just can figure out the gravity part at the moment which is something like this, transform.position.y -= gravity.
Cheers.
p/s: I’m using C# to code.