Well, it does make sense. Nobody forces you to use coordinates where X is horizontal and Y is vertical. If you are in an environment in which the net acceleration on objects is in some direction other than down, you can work with coordinates in which that direction is in the Y axis, define an X axis that is perpendicular to it, and now you have reduced the problem to the situation with no wind.
[/quote]
I still dont understand, for example how do you solve with windX = 4, windY = 3, gravity = 10?
[/quote]
I will assume the sign convention is that positive windY means the wind is blowing down (since it has the same sign as gravity), that the cannon is at the origin and that I am trying to hit the point (targetX, targetY).
accelX = 4, accelY = 13
new_X_vector = normalize(13,-4) = (.95577900872195007289, -.29408584883752309935)
new_Y_vector = normalize(4,13) = (.29408584883752309935,.95577900872195007289)
target_new_X = .95577900872195007289 * targetX + .29408584883752309935 * targetY
target_new_Y = -.29408584883752309935 * targetX + .95577900872195007289 * targetY
You'll similarly convert the vector in which the cannon is pointing using the same conversion I just did for the target. Then solve the problem in the new coordinates with gravity set to sqrt(13^2+4^2) and no wind.
If that's not enough, I'll completely flesh it out, but I don't have the time now.
[/quote]
Nice, but what i have to change on cannon? I only have his position and aim angle in radian.