Profile image

How to make rear aspect missile

5,759 FartResidue  7 months ago

To make a heat-seeking missile that only shoots from behind (like a old sidewinder variant) Paste this code In the Activation Group in the XML editor (make sure to copy the second line too):
.
(abs((rate(Longitude+(TargetDistance*sin(TargetHeading)))>0?atan(rate(Latitude+((TargetDistance*cos(TargetElevation))*cos(TargetHeading)))/rate(Longitude+((TargetDistance*cos(TargetElevation))*sin(TargetHeading))))-90:atan(rate(Latitude+((TargetDistance*cos(TargetElevation))*cos(TargetHeading)))/rate(Longitude+((TargetDistance*cos(TargetElevation))*sin(TargetHeading))))+90)/-1)-(Heading))<110
.
.
decrease the 110 at the end to make the effect stronger
I recommend you use a inferno missile, as it is fire and forget
.
.
I based this off of a Target Heading code from here:
https://www.simpleplanes.com/Forums/View/1333110/Useful-FT-codes
and the rest is random jank I threw together

  • Log in to leave a comment
  • Profile image

    @FartResidue ywwww

    23 days ago
  • Profile image
    5,759 FartResidue

    @SuperSuperTheSylph thanks, i’m working on notch-able radar missiles, however i probably wont be done in time for SP2

    +1 24 days ago
  • Profile image

    the code is fugging genius,tried it on ReinMcDeer's 104 which has 9B's

    +1 24 days ago
  • Profile image
    9,747 Rb2h

    pog

    6 months ago
  • Profile image

    You can make this work on the guardian if you change the lock angle from 20 to 360

    7 months ago
  • Profile image

    @FartResidue
    Nice

    7 months ago
  • Profile image
    5,759 FartResidue

    @CrestelAeronautics I fixed the code block so it can be copy-pasted

    7 months ago
  • Profile image

    @FartResidue
    Ah

    7 months ago
  • Profile image
    5,759 FartResidue

    @CrestelAeronautics delete to part at the end that says &1t; and replace it with <

    7 months ago
  • Profile image

    @FartResidue
    It’s disabling the missile

    7 months ago
  • Profile image
    5,759 FartResidue

    @CrestelAeronautics does it let you fire the missile from the front, or is it disabling the missile?

    7 months ago
  • Profile image

    It won’t work

    7 months ago
  • Profile image
    44.6k rexzion

    true

    7 months ago