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

Welcome to our brand new Clickteam Community Hub! We hope you will enjoy using the new features, which we will be further expanding in the coming months.

A few features including Passport are unavailable initially whilst we monitor stability of the new platform, we hope to bring these online very soon. Small issues will crop up following the import from our old system, including some message formatting, translation accuracy and other things.

Thank you for your patience whilst we've worked on this and we look forward to more exciting community developments soon!

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

    Please login to see this attachment.

    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?

  • 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).

    Please login to see this link.

  • 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.

  • 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.

    Please login to see this link.

  • 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.

  • 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.

    SUPER MEGA BEST CAT ADVENTURES Please login to see this link. and Please login to see this link. live now!

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!