Jump to content
Sign in to follow this  
bella

max altitude on trajectory

Recommended Posts

Can someone please help me with a scripting equation on how to calculate max altitude on trajectory? Regards

Share this post


Link to post
Share on other sites
19 minutes ago, bella said:

Can someone please help me with a scripting equation on how to calculate max altitude on trajectory? Regards

All projectiles except propelled ordnance and bombs follow a simple trajectory formula (ignoring glide, coriolis force and air resistance).

To get the max height you need launch angle and muzzle velocity like this:

 

_muzzleVelocity = 300;//in metres per second
_angle = 45;
_height = (_muzzleVelocity^2 *sin _angle^2) / (2 * 9.80665);
hint str _height //prints 2294.36

 

You can get the muzzlevelocity from config and the angle from some modelToWorld wizardry using gunBeg and gunEnd config entries of the respective weapons.

 

Cheers

 

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×