User Tag List

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

Thread: Testing the collision of a specific pixel

  1. #1
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleSWF Export ModuleUnicode Add-on
    Boba Fonts's Avatar
    Join Date
    Jan 2009
    Location
    Northern Italy
    Posts
    228
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Testing the collision of a specific pixel

    Is it possible to test che collision/overlapping of a specific pixel of an object?
    A condition of this kind:

    if ActiveA (x 12 y 38) is overlapping ActiveB
    then do something

    not the entire object but a single pixel.
    Thanks

  2. #2
    Clicker Multimedia Fusion 2 DeveloperSWF Export Module
    RickyRombo's Avatar
    Join Date
    Mar 2008
    Location
    Somewhere between here and there
    Posts
    3,167
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Testing the collision of a specific pixel

    Well you could use a 1x1 active and have it follow ActiveA at those points and test that instead.

  3. #3
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleSWF Export ModuleUnicode Add-on
    Boba Fonts's Avatar
    Join Date
    Jan 2009
    Location
    Northern Italy
    Posts
    228
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Testing the collision of a specific pixel

    Well you could use a 1x1 active and have it follow ActiveA at those points and test that instead.
    Yes, I thought of that solution, but I have a lot of characters and each one of them has its personal little collider of 1x1 pixel used to test collision of the character's feet with a walkable area.
    I've created a walkable area with continuous scaling to simulate perspective, and it works very well.
    But the problem is that I have an event for every single character like this:

    when Collider1 of Char1 is overlapping the WalkableArea
    then activate the continuous scaling effect on Char1

    when Collider2 of Char2 is overlapping the WalkableArea
    then activate the continuous scaling effect on Char1

    etc etc for some...100 Collider/Characters!


    I want to write -if possible- a single general event that handles them all. Qualifiers are not of great help:

    when Group.Collider is overlapping the WalkableArea
    then activate the continuous scaling effect on Group.Characters
    ...and the effect is applied to all the characters, not only the one associated with the collider.

    I really would like to avoid using any collider and test the collision of the Characters at a hotspot/action point set at their feet!

    I hope I was clear.





  4. #4
    Clicker Multimedia Fusion 2 DeveloperSWF Export Module
    RickyRombo's Avatar
    Join Date
    Mar 2008
    Location
    Somewhere between here and there
    Posts
    3,167
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Testing the collision of a specific pixel

    add the characters to a 'group' and Always set position of the single qualifier to the specified position of the character group. If you don't want to duplicate the 1x1 pixel thing you can have an event NObjects("detector") < NObjects("Group.whatever") : Create ("detector")

    Then when testing collision, have the event test for not only the overlap of the 1x1 detector to whatever object, but the 1x1 to the group as well.

    If you need me to explain better I could try, but I'm sure someone else might be able to say it better

  5. #5
    Clicker Multimedia Fusion 2 DeveloperiOS Export Module
    Nifflas's Avatar
    Join Date
    Jul 2006
    Posts
    2,613
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Testing the collision of a specific pixel

    I'd only use a single 1x1 pixel collision test object, then iterate through the characters with a fastloop and move the collision one pixel object around to perform each text.

    Another solution is to have an animation frame of each character that's only a single pixel, then switch to this animation frame when you test for collision, and then switch back to the previous frame and sequence and restore the animation, so that the collision mask is never displayed.

  6. #6
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleSWF Export ModuleUnicode Add-on
    Boba Fonts's Avatar
    Join Date
    Jan 2009
    Location
    Northern Italy
    Posts
    228
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Testing the collision of a specific pixel

    Your solutions are very engaging, thanks, I'm gonna figure out how to try them. Here's a rough illustration of the problem I have:

    [img:center]http://dsgames.guerrestellari.net/walkable_mess.jpg[/img]

    A walkable area, many characters each one with its personal little collider: only the colliders on the walkable area make their associated characters to be affected by the tint/scaling effects of the walkable area, not the others out of it.
    Qualifiers/Groups don't work, you never get the separation between who's in and who's out of the area of collision, MMF can't select the individuals, conditions remain true even when they should not, it's a mess. That's why I wanted to eliminate the colliders and have directly the Active Objects to collide through their "feet" pixels, but I suppose that's not possible.

    So the single collider + fastloops solution seems promising. The other one (switching between the normal animations and the single pixel frame) must be accomplished through fastloops too? Can fastloops prevent that hidden collision frame to be displayed?

  7. #7
    Clicker Multimedia Fusion 2 DeveloperSWF Export Module
    RickyRombo's Avatar
    Join Date
    Mar 2008
    Location
    Somewhere between here and there
    Posts
    3,167
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Testing the collision of a specific pixel

    Quote Originally Posted by Boba Fonts
    [img:center]Qualifiers/Groups don't work, you never get the separation between who's in and who's out of the area of collision, MMF can't select the individuals, conditions remain true even when they should not, it's a mess. That's why I wanted to eliminate the colliders and have directly the Active Objects to collide through their "feet" pixels, but I suppose that's not possible.
    Ah, I was hoping it would make it easier by testing for a double overlap, but apparently not. I've done it before, I guess its just not working for what you are doing.

  8. #8
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleSWF Export ModuleUnicode Add-on
    Boba Fonts's Avatar
    Join Date
    Jan 2009
    Location
    Northern Italy
    Posts
    228
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Testing the collision of a specific pixel

    Quote Originally Posted by Nifflas
    I'd only use a single 1x1 pixel collision test object, then iterate through the characters with a fastloop and move the collision one pixel object around to perform each text.
    Could you please help me to figure out how to do that?
    Now I have

    Collider1 overlapping WalkableArea --> Set effects on Character1
    Collider2 overlapping WalkableArea --> Set effects on Character2
    Collider3 overlapping WalkableArea --> Set effects on Character3

    and I need to have a single Collider that iterates through all the characters walking around the room and overlapping (or not overlapping) the area in every moment.

    Thanks in advance

  9. #9
    Clicker Multimedia Fusion 2 DeveloperSWF Export Module
    RickyRombo's Avatar
    Join Date
    Mar 2008
    Location
    Somewhere between here and there
    Posts
    3,167
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Testing the collision of a specific pixel

    It's hard to explain, I'll make an example later if you need it.

    Basically spread a value in the characters (which can be put into a group) alterable value a or some other alterable value

    Then:
    Code:
    * On Loop "pixel collisions"
    + Loopindex("pixel collisions") = Alterable Value A("character") // or ("group.whatever")
       - Set position of "collider" to  {whatever position}
    all you need to do is add
    Code:
    * On Loop
    for the collision effects

  10. #10
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleSWF Export ModuleUnicode Add-on
    Boba Fonts's Avatar
    Join Date
    Jan 2009
    Location
    Northern Italy
    Posts
    228
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Testing the collision of a specific pixel

    I definitely have a problem with fastloops: badly need to learn to use them!
    I've tried your example but something is missing. Could you please explain it in detail? :blush:

Page 1 of 2 1 2 LastLast

Similar Threads

  1. Specific, reproducible bug for Direct3D 9 collision detection
    By Rickshaw in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 10th March 2013, 07:28 PM
  2. Get color/ RGB value from specific pixel
    By King_Cool in forum Multimedia Fusion 2 - Technical Support
    Replies: 9
    Last Post: 11th July 2012, 03:41 PM
  3. Collision with pixel?
    By Digitalic in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 28th January 2011, 07:41 AM
  4. Collision Pixel Color
    By Blood_Wist in forum Multimedia Fusion 2 - Technical Support
    Replies: 12
    Last Post: 13th December 2010, 04:17 PM
  5. specific animation has played a specific frame?
    By mobichan in forum Multimedia Fusion 2 - Technical Support
    Replies: 15
    Last Post: 22nd April 2008, 04:34 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
  •