A catapult trajectory

So to figure out the range it will travel use this expression

A(Initial velocity)^2 * Math.sin2(Angle)
or
(((A*(A))*Math.sin(B)*2)/C) * (-1)
I think that works, the -1 is there because it outputs a negative number so I may have messed something up. I gtg, but when I have time I’ll make an example. Drafty is good at math, so they can probably give a better explanation (and my equation could be wrong)

Dig through that if that’s what you’re looking for. On the phone so can’t help otherwise.
You can also use it to drive the actual cannon ball so that it all lines up.

2 Likes

Okay so this is helpful, however I’m trying to make the code work from the projectile, so I’d need to rework this so that it launches itself, and always follows the trajectory perfectly.

2 Likes