 ## Recommended Posts

Greetings,

I am attempting to code a primitive Artificial Intelligence (AI) base from Lua.

This AI is designed to calculate missile statistics and utilize them to defend.

However I am not a physics nerd nor did i really "ace" the class this year.

Which is why I was wondering if anyone was good at it and could help.

I need to calculate the flight time/trajectory of missiles.

A missile can fly 40 blocks in 5.7 seconds.

Thus velocity = 40/5.7

How would I calculate trajectory and flight time out of this?

~Thanks.

##### Share on other sites

A missile can fly 40 blocks in 5.7 seconds.

Flight time: at 45 degrees it will need 7.01 seconds/block (Time_of_flight = distance/[velocity*cos(angle)])

Trajectory: at 45 degrees trajectory will be 3.31 seconds (depends on a lot of factors like the initial height, the angle of the projectile)  (range = [velocity*sin 2*(angle)]/gravitational_acceleration)for initial height 0 (gravitational_acceleration is 9.81m/s*s)

##### Share on other sites

Thanks,

But do these apply to minecraft physics?

Im sure 9.8 m/s/s is Earth's acceleration due to gravity...

##### Share on other sites

I really dont know if the gravitational acceleration apply to minecraft physics so trajectory may be diferent