User Tag List

Results 1 to 7 of 7

Thread: Trigonometry Question

  1. #1
    No Products Registered

    Join Date
    Aug 2006
    Posts
    44
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Trigonometry Question

    Hi,

    I downloaded the demo for MMF2 and am experimenting with the angle of an objecst so that it always points toward the mouse.

    I was planning to use trigonometry for this but found there is no Inverse commands, such as Tan^-1 etc.

    Have I missed something?

  2. #2
    No Products Registered

    Join Date
    Jul 2006
    Location
    Sweden, Lund
    Posts
    140
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Trigonometry Question

    It's
    Code:
    ATan( >Enter number here< )
    in the expression editor. You can get it from Special->Sine and cosine in the new expression dialouge.

  3. #3
    No Products Registered

    Join Date
    Aug 2006
    Posts
    44
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Trigonometry Question

    Ah perfect. Thanks.

  4. #4
    No Products Registered

    Join Date
    Jul 2006
    Location
    Texas
    Posts
    1,225
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Trigonometry Question

    How do you get the angle between two points? ATan(Ydifference/Xdifference) doesn't work because a negative divided by a negative is the same as a positive divide by a positive for example: -5/-5 is the same thing as 5/5, so it would only have angles ranging from 0-179.99 or something like that.

  5. #5
    No Products Registered

    Join Date
    Jun 2006
    Posts
    302
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Trigonometry Question

    you need to make two events, that check if Ydiff>0 or Ydiff<0 and then add 180 degrees

  6. #6
    No Products Registered

    Join Date
    Jul 2006
    Location
    Texas
    Posts
    1,225
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Trigonometry Question

    Ah, thanks.

  7. #7
    Forum Moderator Fusion 2.5 DeveloperAndroid Export ModuleSWF Export Module

    Join Date
    Jun 2006
    Location
    Merseyside, UK
    Posts
    398
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Trigonometry Question

    The Clickteam movement controller extension included in build #243 also provides expressions for retrieving the angle between points or objects.

Similar Threads

  1. Tutorial - Trigonometry In Gaming
    By Eliyahu in forum Articles
    Replies: 18
    Last Post: 12th September 2013, 09:18 PM

Posting Permissions

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