User Tag List

Results 1 to 6 of 6

Thread: Complete Overlap

  1. #1
    Clicker Multimedia Fusion 2 DeveloperiOS Export ModuleSWF Export Module
    Jaffob's Avatar
    Join Date
    May 2008
    Location
    USA
    Posts
    1,833
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Complete Overlap

    Is it possible to test if an object is completely overlapping (inside) another object?

  2. #2
    Forum Moderator

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleXNA Export ModuleInstall Creator Pro
    nivram's Avatar
    Join Date
    Jul 2006
    Location
    Bandon, Oregon
    Posts
    6,773
    Mentioned
    12 Post(s)
    Tagged
    0 Thread(s)

    Re: Complete Overlap

    Are the objects the same size?
    ​458 TGF to CTF 2.5+ Examples and games
    http://www.castles-of-britain.com/mmf2examples.htm

  3. #3
    Clicker Fusion 2.5 Developer

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

    Re: Complete Overlap

    If the objects are identical, then just test if their coordinates are the same.

    If they are different, you could test how far from the center of the big object the little object is (Clickteam Movement Controller can do all the work for you) and if its within a certain amount, that means it's inside it!

  4. #4
    Clicker Fusion 2.5 DeveloperiOS Export Module
    Czentnar's Avatar
    Join Date
    Jan 2007
    Location
    Budapest, Hungary
    Posts
    819
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Complete Overlap

    You can also use detectors: create an active object that looks like the "border" of the bigger object. Then, set the position of this detector always to the big active object. If the smaller object overlaps with the big active object + it does not overlap with the border, then you've tested the completely overlapping!

  5. #5
    Clicker Multimedia Fusion 2

    Join Date
    Jul 2007
    Posts
    138
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Complete Overlap

    You could do this (object 1 is object that object 2 is inside of):

    • X of left side of object 1 < X of left side of object 2
    • X of right side of object 1 > X of right side of object 2
    • Y of top of object 1 < Y of top of object 2
    • Y of bottom of object 1 > Y of bottom of object 2

    If all of these conditions are true, object 2 is inside object 1!

    EDIT: Possible Flaw: if you use this method, the shape of the objects will not affect the outcome... For example, look at this picture:

    This would still think the square was inside the "T". You can still use this method if the shape doesn't matter, though.

  6. #6
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS 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)
    Popcorn's Avatar
    Join Date
    Jun 2006
    Location
    Norway, Bergen
    Posts
    2,366
    Mentioned
    13 Post(s)
    Tagged
    0 Thread(s)

    Re: Complete Overlap

    This might work for you.

Similar Threads

  1. Complete PDF Object
    By Kracker in forum Paid Design & Development Requests
    Replies: 4
    Last Post: 15th October 2015, 06:13 PM
  2. Object overlap - Overlap area
    By Ls2 in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 12th May 2012, 10:06 PM
  3. Hey everyone my first complete game
    By MightyMark in forum Multimedia Fusion 2 - Technical Support
    Replies: 21
    Last Post: 22nd March 2012, 12:38 AM
  4. Help me to complete my project
    By Evilesses in forum Multimedia Fusion 2 - Technical Support
    Replies: 6
    Last Post: 17th April 2011, 02:51 PM
  5. Detect complete overlap
    By Popcorn in forum File Archive
    Replies: 1
    Last Post: 17th August 2008, 08:54 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
  •