User Tag List

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 13

Thread: Need help with "Angle after mouse"

  1. #1
    No Products Registered

    Join Date
    Dec 2007
    Posts
    58
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Need help with "Angle after mouse"

    I want my player to follow my mouse. I know how to do it with directions. But i dont wanna use direcations, just angle. I want him to change angle so his looking at my mouse all the time.

  2. #2
    Clickteam Clickteam
    LB's Avatar
    Join Date
    Jun 2007
    Location
    Richardson, Texas, North America
    Posts
    8,937
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)

    Re: Need help with "Angle after mouse"

    Here is a related post with the math and an example MFA:
    http://www.clickteam.com/epicenter/ubbthreads.php?ubb=showflat&Number=236571
    Working as fast as I can on Fusion 3

  3. #3
    No Products Registered

    Join Date
    Dec 2007
    Posts
    58
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Need help with "Angle after mouse"

    ATan2(Y( "My Object" )-YMouse, XMouse-X( "My Object" ))
    That code dosent work for me.
    It only change angle when i drag the mouse up and down not
    left and right.


  4. #4
    Clickteam Clickteam
    LB's Avatar
    Join Date
    Jun 2007
    Location
    Richardson, Texas, North America
    Posts
    8,937
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)

    Re: Need help with "Angle after mouse"

    You may be doing it wrong - did you look at the attached example? It works perfectly here.
    Working as fast as I can on Fusion 3

  5. #5
    No Products Registered

    Join Date
    Dec 2007
    Posts
    58
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Need help with "Angle after mouse"

    Well i dosent work like i want it in the example either.
    maybe its something wrong on my client?

    In the example, if you drag your mouse up and down your change angle(only), but if you drag your mouse left and right you change the scale(only).

  6. #6
    Clickteam Clickteam
    LB's Avatar
    Join Date
    Jun 2007
    Location
    Richardson, Texas, North America
    Posts
    8,937
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)

    Re: Need help with "Angle after mouse"

    Have you tried moving your mouse in a circle around the center of the screen? I think you're misunderstanding how it works.
    Working as fast as I can on Fusion 3

  7. #7
    No Products Registered

    Join Date
    Dec 2007
    Posts
    58
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Need help with "Angle after mouse"

    Ive been trying for a long time. if i move it in a circel around the center. The line moves 180grades only,(half circel). And it dosent even look like its folloing my mouse. Something is wrong with my exemple. i wish i could record it and show you

  8. #8
    Clickteam Clickteam
    LB's Avatar
    Join Date
    Jun 2007
    Location
    Richardson, Texas, North America
    Posts
    8,937
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)

    Re: Need help with "Angle after mouse"

    Huh, it should rotate like this:
    http://www.youtube.com/watch?v=35ko0cFUAMQ
    I just used CamStudio to record the video.

    What build of MMF2 do you have? The latest is R251. If it only rotates 180 degrees, that sounds like you are on a very old version of MMF2...
    Working as fast as I can on Fusion 3

  9. #9
    No Products Registered

    Join Date
    Dec 2008
    Location
    U.S.
    Posts
    133
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Need help with "Angle after mouse"

    Nay. I be on build 248, and arctangent works fine. It worketh fine on 247 too, I remember. I don't know what's happening on your machine. Did you write Atan instead of Atan2?

    Could it be something with your animation or the condition? Just write Always for the condition. You probably want to set the hotspot to the center. You may want to check if the object's really not turnign or just appears to not turn.

    You can post an example in the file archive.

  10. #10
    Clickteam Clickteam
    LB's Avatar
    Join Date
    Jun 2007
    Location
    Richardson, Texas, North America
    Posts
    8,937
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)

    Re: Need help with "Angle after mouse"

    Watermelon, in an older version of MFM2, there was no ATan2.
    Working as fast as I can on Fusion 3

Page 1 of 2 1 2 LastLast

Similar Threads

  1. A "sort of bug" in IOS builds regarding "mouse pointer is over"
    By BrashMonkey in forum iOS Export Module Version 2.0
    Replies: 3
    Last Post: 27th March 2012, 12:53 PM
  2. [Bug] "Repeat while left mouse-key is pressed"
    By Bipolar_Games in forum Android Export Module Version 2.0
    Replies: 0
    Last Post: 3rd February 2012, 10:36 PM
  3. Lag when I "change angle"
    By pikzilla in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 24th February 2010, 06:34 AM
  4. Simulate "mouse click" in a full screen game
    By Skeets in forum Multimedia Fusion 2 - Technical Support
    Replies: 14
    Last Post: 13th January 2009, 08:40 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
  •