User Tag List

Results 1 to 5 of 5

Thread: Object overlap - Overlap area

  1. #1
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleSWF Export ModuleInstall Creator Pro
    Ls2's Avatar
    Join Date
    Jun 2011
    Location
    Maceió - Brazil
    Posts
    908
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)

    Object overlap - Overlap area

    Hi all,


    I have a doubt. I'm trying to implement a way to calculate the amount of overlapped area in collision between a Active with a obstacle.
    For example, I have two actives.
    - If the first one is completely covered by the second: Set Counter = 100;
    - If the first one is half covered by the second: Set Counter = 50;
    - If the first one isn't covered by the second: Set Counter = 0;

    And the Counter varies between zero and hundred, depending of overlap area.

    Is it possible?

    Thanks for all and sorry for my english :/

  2. #2
    Clicker Fusion 2.5

    Join Date
    Apr 2012
    Posts
    375
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Perhaps you could use distances between hotspots to do this? If it covers the other completely, the hotspots would be at the same position. If the distance is a certain amount, it will cover half.

  3. #3
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleSWF Export ModuleInstall Creator Pro
    Ls2's Avatar
    Join Date
    Jun 2011
    Location
    Maceió - Brazil
    Posts
    908
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Hi Storsorgen,


    Thanks for your help. This method works in some cases, but if I have a active with a irregular form, it don't work :/

  4. #4
    Clicker Fusion 2.5 Developer

    Join Date
    Jul 2008
    Posts
    1,295
    Mentioned
    8 Post(s)
    Tagged
    0 Thread(s)
    It's technically possible, but probably not practical.

    One way would be to calculate the rectangular "bounding box" overlap, and then run a fastloop to test each individual pixel within that area - which you could do with a 1x1 pixel detector, checking whether it overlaps both objects. That's pretty easy if you just have one of each object type, but as with most things in MMF2, if you have multiple instances it would get a *lot* more tricky (ie. not worth the effort).

    I made you an example:
    http://skydrive.live.com/redir.aspx?...094271BBDA!131

    Obviously to make it into a percentage, you just multiply by 100 and divide by the object's area.

  5. #5
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleSWF Export ModuleInstall Creator Pro
    Ls2's Avatar
    Join Date
    Jun 2011
    Location
    Maceió - Brazil
    Posts
    908
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Hi MuddyMole,

    Your example is perfect for me! Thanks a lot Works perfectly here.

Similar Threads

  1. Understanding Object Overlap
    By TheFieryPlumber in forum Multimedia Fusion 2 - Technical Support
    Replies: 12
    Last Post: 24th May 2013, 03:08 PM
  2. Testing overlap between two of the same object
    By brawltaunts22 in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 3rd May 2012, 12:45 PM
  3. Overlap Condition and Object Selection
    By King_Cool in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 27th January 2012, 07:10 AM
  4. [IsItPossible?]Get %age of object overlap
    By Karzon in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 9th March 2008, 11:47 AM
  5. Picking only one object during overlap
    By MechatheSlag in forum Multimedia Fusion 2 - Technical Support
    Replies: 6
    Last Post: 18th June 2007, 01:46 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
  •