User Tag List

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

Thread: Find Major / Minor Arc In Circle?

  1. #1
    Forum Moderator Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export ModuleXNA Export Module
    ProdigyX's Avatar
    Join Date
    Jan 2011
    Posts
    1,197
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    Find Major / Minor Arc In Circle?

    Ohla ladies and gentlemen!

    So I have a perplexing question, but i will ask it in 2 parts

    Part One.
    How can I find the arc angle measurements of a circle if i have 2(or 3) points on the circumference of a circle?

  2. #2
    Clicker Multimedia Fusion 2SWF Export Module

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

    Re: Find Major / Minor Arc In Circle?

    Hrmm, what do you know about this circle? If you know its center and radius (radius not necessary) you can easily find it by trigonometry; find the angle between the points and the center of the circle, then find the difference between those two angles. Thats your arc.

    Now if you only know the location of the points themselves, you need a minimum of 3 points to be able to find the arc (or else theres an infinite amount of circle solutions)

    If thats the case, this might be instructive;
    http://paulbourke.net/geometry/circlefrom3/

  3. #3
    Forum Moderator Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export ModuleXNA Export Module
    ProdigyX's Avatar
    Join Date
    Jan 2011
    Posts
    1,197
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    Re: Find Major / Minor Arc In Circle?

    Gotcha,

    I will always know the origin of the circle. (The middle of my player object)
    I will also always know 2 points on the circumference of the circle (The player right click 2 times and i store the x & y values of each point)

    From these 2 points on the circumference, I can find both the Minor and Major Arc angles (Do what you do and then subtract that value from 360).

    Part 2 of the question is this;

    Is there some kind of gesture recognizing feature extension, or something I can use to track the "shape/movement trail" of the mouse?

    In my game, the player will be able to fire a beam of energy at a specific location of their choosing. (They simply click 2 locations and everything in between there is fired upon). The main problem with this method is that sometimes it it will fire the major arc (300 degrees for example) when the player wanted to fire the minor arc (60 degrees). In some situations however, the player WILL want to fire the major arc over the minor arc.

    The solution to this could be to track the trail the mouse follow. (That way the player would only have to click & drag the mouse to fire the weapon/energy beam instead of clicking twice).

    If you need an example of what this problem in action, I can upload the .mfa and link it here

    So the real question is this;
    What can I do to distinguish the major arc from the minor arc and vice versa if the player can only click & drag the mouse, or click twice?

  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: Find Major / Minor Arc In Circle?

    If the difference between the angles is more than 180, just shoot the other direction and be cautious of the 0/360 trap.
    Working as fast as I can on Fusion 3

  5. #5
    Forum Moderator Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export ModuleXNA Export Module
    ProdigyX's Avatar
    Join Date
    Jan 2011
    Posts
    1,197
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    Re: Find Major / Minor Arc In Circle?

    I mean shooting the major/minor arc is situational. I want the player to be able to shoot one, not just the minors arcs, or just the majors arcs. A player might NEED to shoot a 330 degree arc. I need to find a way for the player to be able to do both

  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: Find Major / Minor Arc In Circle?

    OH, I know what you mean. That's tricky but not too hard; I'll make an example...

    EDIT: Turning out much harder. Eliyahu and I are working on it but we need to sleep on it tonight...
    Working as fast as I can on Fusion 3

  7. #7
    Forum Moderator Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export ModuleXNA Export Module
    ProdigyX's Avatar
    Join Date
    Jan 2011
    Posts
    1,197
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    Re: Find Major / Minor Arc In Circle?

    Thank ya very much

  8. #8
    Forum Moderator Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export ModuleXNA Export Module
    ProdigyX's Avatar
    Join Date
    Jan 2011
    Posts
    1,197
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    Re: Find Major / Minor Arc In Circle?

    A work around to this, MAY to lock the cursor into a circle upon an event. I've tried this, and never got my trig formula to work.

    Perhaps I'm simply overthinking the trig formula.

    What the the possible ways to lock the cursor to move only in a perfect circle upon an event?

  9. #9
    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: Find Major / Minor Arc In Circle?

    You could have an object locked to a perfect circle and thus give the user a visual representation of where they will shoot, or you could make it invisible if you wanted. Either way I don't think you should be hiding the mouse.

    I am still trying my luck with this and it is tricky all right, I have the right concept, but I can't find the right way to implement it...
    Working as fast as I can on Fusion 3

  10. #10
    Forum Moderator Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export ModuleXNA Export Module
    ProdigyX's Avatar
    Join Date
    Jan 2011
    Posts
    1,197
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    Re: Find Major / Minor Arc In Circle?

    The mouse won't be hidden in the least bit.

    I just need it to move in a circle and only a circle at certain times. However upon more thinking, I think I found a flaw in my work around.

    By lock I mean instead of anywhere movement, make it only a circular movement, not keep it in one place, or make it hidden :P

    The particle spray object find the shortest direction to fire to naturally. (For example, if you tried to fire 18 to 8 going counter clockwise, the long way, it would fire 18 to 8 the short way) To fix this, all one had to do is is 32 to either the starting direction value, or the ending direction value depending on the situation

Page 1 of 2 1 2 LastLast

Similar Threads

  1. Circle Between Clothes
    By Decoamorim in forum File Archive
    Replies: 0
    Last Post: 23rd October 2013, 07:12 PM
  2. Wildcard possible with - Rich Text Object: Controls > Find > Find and Select Text ??
    By ratty in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 22nd March 2013, 01:28 PM
  3. The Circle Tarot
    By Jeff in forum iOS Released Games & Apps
    Replies: 0
    Last Post: 10th August 2011, 01:23 PM
  4. when making a circle...
    By solarstorm in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 5th May 2011, 05:55 PM
  5. Bresenham's circle
    By NeoMonkey in forum Extension Development
    Replies: 7
    Last Post: 16th July 2010, 02:53 AM

Posting Permissions

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