User Tag List

Results 1 to 6 of 6

Thread: error in collision detection when rotating an image with a transparent border

  1. #1
    Clicker Fusion 2.5

    Join Date
    May 2013
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    error in collision detection when rotating an image with a transparent border

    Here is an example of a problem I have recently noticed:

    collision-rotation error example.mfa

    When an image that has a transparent border is rotated using "Set angle", even to only multiples of 90 (a situation where, as far as I can tell, the rotation should be pixel-perfect with no blending of pixels), it is sometimes triggering collisions with objects that should be overlapping only fully transparent pixels, which usually do not trigger collisions. The transparent border is necessary to ensure smooth looking edges at every angle, but now it's causing problems of its own.

    I know you could work around the problem by having two objects- an invisible one with no transparent border to handle collisions, and another with the transparent border to follow it and provide the visuals- but I still would like to understand this problem more and find out if there are any easier fixes.

    I wish I knew what the rotation algorithm was like in general. Because it also causes another problem of an image sliding a couple of pixels when rotating in place when the dimensions of the image are odd (which, if anything, you would think would be more likely to be prevent that issue, since there's a perfect center).

    Does anybody have any insight into this?

  2. #2
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export ModuleUnicode Add-on
    mobichan's Avatar
    Join Date
    Oct 2007
    Location
    Buffalo, NY
    Posts
    3,307
    Mentioned
    28 Post(s)
    Tagged
    0 Thread(s)
    Sorry I am away from my PC so I can’t open your file. Are your actives set to fine detection. I am pretty sure when you do NOT use fine detection the collision is a screen aligned rectangle that resizes to ascribe your active’s size. The rectangle does not rotate at all. If you want more fine control you need to use pixel collision ( fine collision turned ON).

  3. #3
    Clicker Fusion 2.5

    Join Date
    May 2013
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Fine detection collision appears to be turned on. As I understand it, having that turned off would make every transparent pixel in the image trigger a collision all the time. What I'm seeing is collisions triggered only on certain sides of the image (though the image is a square with a 1-pixel transparent border around all sides), and only at certain rotations. Hopefully the example will make things clearer if you get a chance to look at it.

    I would love to be wrong about this and there just be something simple I am missing, rather than there being fundamental error of this nature in HWA rotations.

  4. #4
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export ModuleUnicode Add-on
    mobichan's Avatar
    Join Date
    Oct 2007
    Location
    Buffalo, NY
    Posts
    3,307
    Mentioned
    28 Post(s)
    Tagged
    0 Thread(s)
    I see what you mean. I would expect there to be no overlap in this case. Seems like a bug. I also did a test where you just make each rotation a frame of an animation and cycle through the frames when you press a button. Collision never triggered. So I think this is an issue with rotation.

    Please report this to the bug tracker (link at the top of the forum) and include the example file.

  5. #5
    Clicker Fusion 2.5

    Join Date
    May 2013
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I did that already. I just thought I would see if the community knew anything about it.

    Though seeing that there are unresolved bugs in the bug tracker that appear to have been logged as early as 2015 is fairly discouraging.

  6. #6
    Clicker Fusion 2.5 Developer
    PBarwick's Avatar
    Join Date
    Jul 2014
    Posts
    390
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    It's unrealistic to assume every single bug ever reported will be fixed, that's a tall ask for any company. If you look at the changelog you can see clickteam do resolve a lot.

    I hope your problem gets resolved.

    I don't know what you're aiming for with your project in this situation, but for most cases I'd recommend having a second object that you use to test for collision anyway.

Similar Threads

  1. Replies: 4
    Last Post: 20th June 2017, 09:15 PM
  2. Smoothly rotating spinner with detection for where it stops? Angle vs Direction.
    By ratty in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 2nd September 2012, 02:55 AM
  3. rotating an image
    By delusan in forum The Games Factory 2 - Technical Support
    Replies: 4
    Last Post: 17th April 2007, 10:10 PM
  4. BUG? Quick Backdrop Border/Transparent Color
    By aidmm in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 9th February 2007, 04:33 AM
  5. BUG? Quick Backdrop Border/Transparent Color
    By aidmm in forum File Archive
    Replies: 0
    Last Post: 9th February 2007, 04:32 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
  •