User Tag List

Results 1 to 8 of 8

Thread: Selecting object overlap problem

  1. #1
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleXNA Export Module
    Outcast's Avatar
    Join Date
    Jan 2011
    Location
    Sweden
    Posts
    3,233
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)

    Question Selecting object overlap problem

    This is a thing that from time to time causes problems for me and I don't know if I have ever found a real solution to it. If you have an object that should check for an overlap with another object but the object overlaps two instances of the object and you choose to pick one at random the result is that the object switches back and forth between the objects rapidly. Is there a way to make it only choce one of the objects and not switch this way between them? In the best case scenario it would choose the object that overlaps the most if there is any difference (say that you have a square that is 6x6 pixels and it overlaps with 4 pixels on one of the objects and only with 2 on the other then it would choose the one with 4 pixels since that is more and if it is exactly the same it would just pick one of them at random and stick to that one)

    I have uploaded an example of the problem
    Attached files Attached files

  2. #2
    Clicker Fusion 2.5Fusion 2.5+ DLC

    Join Date
    Jan 2018
    Posts
    240
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    i think it isn't possible to choose the one with the most pixel numbers in collision, you have to choose an other characteristic an add it in your condition

  3. #3
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleXNA Export Module
    Outcast's Avatar
    Join Date
    Jan 2011
    Location
    Sweden
    Posts
    3,233
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    Yes but what would be the best method to do this? I do have an unique ID in every object, but how to pick the one with the lowest ID for example? My thinking is a fastloop, but is there a better less resource expensive way to do it?

  4. #4
    Clicker Fusion 2.5Fusion 2.5+ DLC

    Join Date
    Jan 2018
    Posts
    240
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    if you delete line "choose one" fusion will choose the last object in collision then it will not swap between overlaped object

  5. #5
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleXNA Export Module
    Outcast's Avatar
    Join Date
    Jan 2011
    Location
    Sweden
    Posts
    3,233
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    Nice that actually seems to work! It works much better now! If anyone know a way to detect by pixel overlap also please let me know!

  6. #6
    Clicker Fusion 2.5Fusion 2.5+ DLC

    Join Date
    Jan 2018
    Posts
    240
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    i think you should choose an other method because i'm pratically sure that it is not possible, you can for exemple compare distance between you and the overlaped object and choose the nearest

  7. #7
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleUniversal Windows Platform Export ModuleSWF Export Module

    Join Date
    Jun 2014
    Posts
    54
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Sounds like you need to use a for each loop, and then as fredetmumu says, test for nearest distance of overlapped objects.

    It's very possible but there isn't a function "pick nearest of overlapping Active Object A", so you have to roll your own one.

    Iirc the Select Object extension lets you pick actives based on their alterable value, but I've barely ever used it.

  8. #8
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleXNA Export Module
    Outcast's Avatar
    Join Date
    Jan 2011
    Location
    Sweden
    Posts
    3,233
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    Yes I managed to do it with for each! Thanks!

Similar Threads

  1. Replies: 3
    Last Post: 14th June 2018, 10:34 AM
  2. Replies: 3
    Last Post: 12th May 2017, 06:00 PM
  3. Problem: Overlap detection is checking by the highest x and Y of an object
    By Stranger in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 30th July 2015, 01:12 AM
  4. Object overlap - Overlap area
    By Ls2 in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 12th May 2012, 11:06 PM
  5. Selecting a new movement problem
    By Apex in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 18th March 2011, 06:28 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
  •