Jump to content


Photo

target.facing doesn't work properly?


    1 reply to this topic

    #1 Ichiba

    Ichiba

      Newbie

    • Members
    • Pip
    • 3 posts

      Posted 15 October 2017 - 12:19 PM

      local target = windower.ffxi.get_mob_by_target("t")
      print(target.facing)
      

      When using the above snippet of code, the value returned doesn't seem to always be generated the same way for all targets. Some report in a range from -pi to +pi, while others are from 0 to 2pi. It does not matter if it's a PC or NPC; those that report incorrectly will continue to do so repeatedly. Am I somehow using this function or interpreting its results incorrectly? Should I submit a bug report? Thanks.

       

      Edit: Should I have posted this in the addon development section? If so, I apologize.



      #2 sdahlka

      sdahlka

        Advanced Member

      • Members
      • PipPipPip
      • 324 posts

        Posted 15 October 2017 - 07:11 PM

        local target = windower.ffxi.get_mob_by_target("t")
        print(target.facing)
        

        When using the above snippet of code, the value returned doesn't seem to always be generated the same way for all targets. Some report in a range from -pi to +pi, while others are from 0 to 2pi. It does not matter if it's a PC or NPC; those that report incorrectly will continue to do so repeatedly. Am I somehow using this function or interpreting its results incorrectly? Should I submit a bug report? Thanks.

         

        Edit: Should I have posted this in the addon development section? If so, I apologize.

        it should be like (im not sure if the directions are correct you can check by using your char)

        --direction facing
        6.2831853071796or0 is North
        1.5707963267949 is East
        3.1415926535898or pi is South

        4.7123889803847 is West

         

        it has nothing to do with your viewpoint but theirs






        1 user(s) are reading this topic

        0 members, 1 guests, 0 anonymous users