User Tag List

Results 1 to 6 of 6

Thread: 360 Degree Maths Problem

  1. #1
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    DaveC's Avatar
    Join Date
    Jun 2007
    Location
    Perth, Australia
    Posts
    2,111
    Mentioned
    13 Post(s)
    Tagged
    0 Thread(s)

    360 Degree Maths Problem

    So I have an object that rotates 360 degrees. When it is in a range from 0-44 (a 45 degree arc) the value of the object is set to 1, when it is in a range from 45-90 (another 45 degree arc) the value is set to 2 etc all the way around to complete the circles 360 degrees. Now I can do this with a bunch of events using angle is > than A + angle is lower than B - set value to C.. but it seems stupid to have like 8 events to do this..

    For you mathematically minded people Is there an equation I can use that finds the current range the object is facing (dividing the 360 degrees into 8 equal peices) ?? Thanks!

  2. #2
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export ModuleUnicode Add-on
    Fanotherpg's Avatar
    Join Date
    Jul 2006
    Location
    High Wycombe, Buckinghamshire, UK
    Posts
    3,665
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What you want to achieve with it?

    If you just set value to be (Degree mod 360)/45.0 (limited to 360/45.0) it always will be between 0-8 (0 to 0.99 for 0-45 degrees).

  3. #3
    Clicker Fusion 2.5 DeveloperiOS Export ModuleSWF Export Module
    Pineapple's Avatar
    Join Date
    Oct 2010
    Posts
    431
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Like This?

    range.mfa

  4. #4
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    DaveC's Avatar
    Join Date
    Jun 2007
    Location
    Perth, Australia
    Posts
    2,111
    Mentioned
    13 Post(s)
    Tagged
    0 Thread(s)
    both great replies! thanks kind of.. I should have explained my problem better but I was at work trying to anticipate and then describe the problem I knew I would have from my "pseudo code"

    Attached is a file I quickly pulled together with the problem.. The top group is the one with the events that I'd like to be squished down into one line.. it just seems so stupid having that many lines for something so basic.

    Touch DPad.mfa

  5. #5
    Clicker Fusion 2.5 DeveloperiOS Export ModuleSWF Export Module
    Pineapple's Avatar
    Join Date
    Oct 2010
    Posts
    431
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It's basically what fanotherpg said.

    Touch DPad_fix.mfa

  6. #6
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    DaveC's Avatar
    Join Date
    Jun 2007
    Location
    Perth, Australia
    Posts
    2,111
    Mentioned
    13 Post(s)
    Tagged
    0 Thread(s)
    ah beautiful, thanks! I knew it'd be something simple... should have paid more attention in the maths classes back in the day

Similar Threads

  1. Problem with 360 degree aiming.
    By Watermelon786 in forum File Archive
    Replies: 2
    Last Post: 18th March 2010, 02:41 AM
  2. bit of a maths help if anyone can?
    By Gibbon in forum Multimedia Fusion 2 - Technical Support
    Replies: 7
    Last Post: 17th August 2009, 02:54 PM
  3. Maths Problem
    By MuddyMole in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 11th April 2009, 02:49 AM
  4. [Problem] 360 degree with platform movement?
    By JonathanC in forum Multimedia Fusion 2 - Technical Support
    Replies: 12
    Last Post: 16th July 2008, 09:32 AM
  5. Decimals and Maths
    By IsaacBoy in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 8th November 2006, 02:03 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
  •