Results 1 to 6 of 6

Thread: MakeCompass to coords

  1. #1
    Join Date
    Feb 2006
    Posts
    3,044
    Mentioned
    4 Post(s)
    Quoted
    21 Post(s)

    Default MakeCompass to coords

    Hey is there function that would make compass to coordinates. (Tried using RotatePoint) But failed.

    Thanks in advanced.


    ~Home

  2. #2
    Join Date
    Jan 2007
    Posts
    8,876
    Mentioned
    123 Post(s)
    Quoted
    327 Post(s)

    Default

    It's called MMToMs or something like that

  3. #3
    Join Date
    Feb 2009
    Location
    Hungary (GMT + 1)
    Posts
    1,774
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I don't really understand what you want. So you have a point on the mini map and you want to rotate the compass so that the point is in the center of main screen?
    Heysus made a function that does that, I will dig it up.

    EDIT: Here it is: http://villavu.com/forum/showthread.php?t=53872
    Hopes that's what you want.

  4. #4
    Join Date
    Dec 2006
    Location
    Houston, TX USA
    Posts
    4,791
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Assuming your compass is already at north all you would have to do is use the simple maths

    Degrees(ArcTan2(Y1- Y2, X1- Y2)) + 90;

    i.e.

    MakeCompass(Round(Degrees(ArcTan2(MMCY - P.Y, MMCX - P.X)) + 90));

    I guess if you're not already at 0d (north) then just

    MakeCompass(Round(Degrees(ArcTan2(MMCY - P.Y, MMCX - P.X)) + 90 + rs_GetCompassDegrees));
    Last edited by Wanted; 03-16-2010 at 06:47 PM.

  5. #5
    Join Date
    Feb 2006
    Posts
    3,044
    Mentioned
    4 Post(s)
    Quoted
    21 Post(s)

    Default

    Quote Originally Posted by IceFire908 View Post
    Assuming your compass is already at north all you would have to do is use the simple maths

    Degrees(ArcTan2(Y1- Y2, X1- Y2)) + 90;

    i.e.

    MakeCompass(Round(Degrees(ArcTan2(MMCY - P.Y, MMCX - P.X)) + 90));

    I guess if you're not already at 0d (north) then just

    MakeCompass(Round(Degrees(ArcTan2(MMCY - P.Y, MMCX - P.X)) + 90 + rs_GetCompassDegrees));
    I think that you got it right I mean't that you will rotate compass to the Point

    ~Home

  6. #6
    Join Date
    Sep 2008
    Location
    Chicago
    Posts
    224
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I made this a few months ago.

    http://villavu.com/forum/showthread.php?t=53872

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •