Results 1 to 5 of 5

Thread: How does simba get the camera degrees?

  1. #1
    Join Date
    Dec 2011
    Posts
    353
    Mentioned
    3 Post(s)
    Quoted
    8 Post(s)

    Default How does simba get the camera degrees?

    Title.

  2. #2
    Join Date
    Dec 2006
    Location
    Sweden
    Posts
    10,812
    Mentioned
    3 Post(s)
    Quoted
    16 Post(s)

    Default

    You're an SRL Member and don't read the include? :/

    Simba Code:
    Function rs_GetCompassAngleRadians: Extended;
    var
      TPA: TPointArray;
      T, M: TPoint;
      B: TBox;
    begin
      B := IntToBox(529, 9, 557, 39);
      with B do
        FindColorsSpiralTolerance(T.x, T.y, TPA, 65536, x1, y1, x2, y2, 0);
      if Length(TPA) < 1 then
       Exit;
      M := MiddleBox(B);
      T := MiddleTPA(TPA);
      Result := ArcTan2(-(T.Y - M.Y), T.X - M.X+0.5) + Radians(90);
      Result := fixRad(Result - Pi);
    end;
    Then just Degrees() it.

    Or is there something there you don't understand?


    Send SMS messages using Simba
    Please do not send me a PM asking for help; I will not be able to help you! Post in a relevant thread or make your own! And always remember to search first!

  3. #3
    Join Date
    Dec 2011
    Posts
    353
    Mentioned
    3 Post(s)
    Quoted
    8 Post(s)

    Default

    Quote Originally Posted by Harry View Post
    You're an SRL Member and don't read the include? :/

    Simba Code:
    Function rs_GetCompassAngleRadians: Extended;
    var
      TPA: TPointArray;
      T, M: TPoint;
      B: TBox;
    begin
      B := IntToBox(529, 9, 557, 39);
      with B do
        FindColorsSpiralTolerance(T.x, T.y, TPA, 65536, x1, y1, x2, y2, 0);
      if Length(TPA) < 1 then
       Exit;
      M := MiddleBox(B);
      T := MiddleTPA(TPA);
      Result := ArcTan2(-(T.Y - M.Y), T.X - M.X+0.5) + Radians(90);
      Result := fixRad(Result - Pi);
    end;
    Then just Degrees() it.

    Or is there something there you don't understand?
    Wow sorry I did but I must have overlooked it :s

  4. #4
    Join Date
    Sep 2007
    Location
    British Columbia, Canada
    Posts
    4,047
    Mentioned
    1 Post(s)
    Quoted
    2 Post(s)

    Default

    But we can't get tile angle obviously But if we could, ooo the possibilities!

  5. #5
    Join Date
    Dec 2006
    Location
    Sweden
    Posts
    10,812
    Mentioned
    3 Post(s)
    Quoted
    16 Post(s)

    Default

    Quote Originally Posted by NexPB View Post
    Wow sorry I did but I must have overlooked it :s
    Didn't mean to sound mean. Just ctrl+click on a function next time, it'll save your life!


    Send SMS messages using Simba
    Please do not send me a PM asking for help; I will not be able to help you! Post in a relevant thread or make your own! And always remember to search first!

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
  •