Profile image

How to make rear aspect missile

5,546 FartResidue  4 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
    7,898 Rb2h

    pog

    3 months ago
  • Profile image

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

    4 months ago
  • Profile image

    @FartResidue
    Nice

    4 months ago
  • Profile image
    5,546 FartResidue

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

    4 months ago
  • Profile image

    @FartResidue
    Ah

    4 months ago
  • Profile image
    5,546 FartResidue

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

    4 months ago
  • Profile image

    @FartResidue
    It’s disabling the missile

    4 months ago
  • Profile image
    5,546 FartResidue

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

    4 months ago
  • Profile image

    It won’t work

    4 months ago
  • Profile image
    44.3k rexzion

    true

    4 months ago