I woke up today and the new beta featured a new parameter:
fuseInput. This immediately got me thinking, and I came up with this. While the new auto fuses can simply be timed to the linear distance, I decided on something more complicated as cannon projectiles are pulled down by gravity. As well as that, I also upgraded the old turret's simple funky trees with something much more... fun... to compensate for the force of gravity.
It works best at longer range and has a built in range of 20km. This can be put on planes if gyros are used instead of rotators.
Thanks to SnoWFlakE0S for linking the proper equations to do this:
Function Physics Explanation
(But no Funky Trees! So people who took Physics can understand easily!)
Thanks to SnoWFlakE0S for linking the following equation:
This allows the cannon to take account gravity to hit (X,Y). These being calculated on a plane based from the turret's heading using trig.
The heading is nearly the same as the old turret. Basically, the fun two-vector projectile motion but simplified and solved into 1 equation with the variables I need/have.
The fuse is different than a linear calculation, which would calculate the amount of time the shell would reach linearly (Distance/Speed). Since the projectile is a two-vector object, we find the horizontal vector and then divide by the total horizontal distance to attempt to explode near the target, unlike the normal linear method which would result in the shell exploding too early as the linear path would be shorter than the parabolic one.
To become cool and reason why it looks so intimidating, is we need to find the horizontal vector of the already gravity-corrected turret angle, (as opposed to the target’s component of horizontal displacement, which is from straight TargetElevation) meaning we plug the entire equation into the trig.
Want to know the license for these FUNKtions? look at a rotator lol
- Successors 8 airplane(s) +98 bonus
- Created On Windows
- Wingspan 8.2ft (2.5m)
- Length 10.9ft (3.3m)
- Height 12.4ft (3.8m)
- Empty Weight 4,832lbs (2,191kg)
- Loaded Weight 9,125lbs (4,139kg)
- Wing Loading -439,839.3lbs/ft2 (-2,147,483.6kg/m2)
- Wing Area 0.0ft2 (0.0m2)
- Drag Points 5843
- Number of Parts 67
- Control Surfaces 0