User Tag List

Results 1 to 6 of 6

Thread: Noobish question about angles

  1. #1
    No Products Registered

    Join Date
    Jun 2010
    Location
    Sutton, Surrey, UK
    Posts
    90
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Noobish question about angles

    I know it's quite lame to ask this but, I do struggle with this type of math, as I haven't studied it much. I'll try to explain the best I can.

    When dealing with engines with slopes in them, people tend to use 2 angle dots that detect the floor below the character. Then, according to both the dots Y positions, it calculates the angle for the character sprite to rotate to. How does this work?

    Also, If the character is on a slope already, say, a 45degree angle slope, how would I make the angle dots move towards the correct angle, rather than directly down?

    I am aware that this uses the Sin/Cos functions, and I have tried dissecting code from other engines, but I never really understood how it all worked.

    Sorry for asking a very detailed question, and probably explaining it rather poorly. But whatever replies I get will be greatly appreciated

  2. #2
    No Products Registered

    Join Date
    Aug 2010
    Posts
    343
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Noobish question about angles

    Here is an example of 'dot following' - a car on hills.
    Not sure if it will help but just might.

    http://www.buddhamind.info/mmf/AK_angleSeries.mfa
    Basically it sets the angle of the car using triangulation.




  3. #3
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export Module
    Eliyahu's Avatar
    Join Date
    Oct 2007
    Location
    Seattle, WA
    Posts
    1,523
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Noobish question about angles

    If you're looking for some help understanding how trigonometry works, I wrote an article: http://www.clickteam.com/epicenter/ubbthreads.php?ubb=showflat&Number=205565

    Not completely relevant to your problem, but it'll give you an idea on how these sin and cos function work, instead of using them blindly. Just if you want to check it out sometime

  4. #4
    No Products Registered

    Join Date
    Jun 2010
    Location
    Sutton, Surrey, UK
    Posts
    90
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Noobish question about angles

    arfa, that image you attached made me understand how the method actually retrieves the angle, which is helpful to me, thanks!

    Eliyahu, checking out the guide at the moment

  5. #5
    Clicker Multimedia Fusion 2SWF Export Module

    Join Date
    Sep 2006
    Posts
    1,544
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    Re: Noobish question about angles

    and as far as finding the points themselves, this might help:
    http://www.clickteam.com/epicenter/ubbthreads.php?ubb=showflat&Number=207486#Post2074 86

  6. #6
    No Products Registered

    Join Date
    Aug 2010
    Posts
    343
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Noobish question about angles

    The two primary building blocks are Pythagoras and trigonometery.

    The second....
    Your car has broken down. The ubiquitous, slightly predatory tow truck driver arrives. You look at him for a short while and say:
    "So, car tow-er?" as in one who tows
    This says it all - SOH CAH TOA

    Sine = Opposite over Hypotenuse
    Cosine = Adjacent over Hypotenuse
    Tangent = Opposite over Adjacent

    High school memory that has never failed...

Similar Threads

  1. Noobish app build question...audio
    By Warmachine in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 8th May 2013, 12:55 PM
  2. Noobish question about Lua and compatibility
    By Outcast in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 14th July 2012, 06:42 AM
  3. Question about rotation/angles.
    By camelman in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 30th October 2008, 03:35 AM
  4. Ugh....Another noobish question, Soz.
    By Dynamite in forum Multimedia Fusion 2 - Technical Support
    Replies: 11
    Last Post: 27th December 2007, 11:47 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
  •