Profile image

Funky tree wizards,i need your help again

10.7k YishFish42  6 days ago

So I've been wanting yo test out an input so that more than one turret can aim at the same target (example a small division of tanks) i think i discovered the formula but I'm not sure how fo make the formula
Here's a diagram i made for it

In this case,i want an imput for the tank number 2
But the only real cockpit is in tank number 1

The formula should do these things:
1-find the distance between tank 1 and tank 2
2-find the distance between tank 2 and the target (probably using pythagore)
3-find the angle that tank 2 need to use in order to aim properly on the target

How can i make a formula (or input) for the tank number 2?

  • Log in to leave a comment
  • Profile image
    10.7k YishFish42

    @OverlordPrime i believe so

    +1 5 days ago
  • Profile image

    It'll be a pain but very much possible

    +1 6 days ago
  • Profile image
    10.7k YishFish42

    @SILVERPANZER damm this is smart i feel like i overcomplicated mine😭

    6 days ago
  • Profile image
    62.8k SILVERPANZER

    I did something similar for these small Tanks (there are 3 Tanks in one squad), they all have automatic targeting, it works something like this: standard target data (TargetElevation, TargetHeading, TargetDistance) is broken down into target coordinates (TLat, TLon, TAlt), inside each Tank there is a cockpit with variable outputs (cockpit coordinates), this data is combined and then converted back into standard target data (example; Target
    _Elevation
    2, TargetHeading2, TargetDistance2).

    +1 6 days ago