0 Favourites

[Solved] trouble with clicking a graphic with alpha space

  • Hi there,

    I have this project http://part12studios.com/temp/SS15/ i'm working on, but the issue is that the next button clicks great.. it's a png.. it's got alpha channel stuff going on but it seems like i can click any part of it and it triggers..

    now the back button is a mystery.. it doesn't work nearly as well.. it seems very random and inconsistent about where a click counts or doesn't count. I'm just at a loss to understand what' could be going on that would cause such inconsistent click area behavior. i would like the whole png to be clickable..

    click in the middle of the C on the "back" button.. to see what i'm talking about.. yet you can click the black on the K and it does.. and you can click stuff to the left as well.. just seems like things are not sync'd up.. some black can be clicked also and not respond.. very odd.

    perhaps there is some hidden behavior / attribute I haven't come across that can toggle "full detection" vers "only on pixels".

    Thanks!

    Caleb

  • part12studio did you crop the image in the system? I noticed in my builds when I do crop an object to lower it's hit box or even have something else a hint over it, It's hard to click on that one key spot.

  • Construct 3

    Buy Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Buy Now Construct 3 users don't see these ads
  • Also checked out all your buttons, everything work's fine for me.

  • the big thing to test is the back button.. everything else is working well.

    i feel like back needs to be clicked a few times..

    the images were not cropped in C2, although I have noticed that if i hightly / drag / move an image over in side of a screen, the touch detection seems to remain with where the source image is..

    in the case of the back button, it's pretty cut and dry. However in a way it does seem to be like that..

    but CampingCarl are you able to click in the middle of the "C" in back and it go back for you? i'm using chrome for my testing.. but i tested in IE11 and it does the same thing..

    Thanks!

    Caleb

  • ok i did another test here to see if this might be something someone can look at.. the exact same problem is happening in this simple example as my full blown project..

    https://www.dropbox.com/s/7unguiia8x6bz ... e%201.capx

    notice how you you can click the back button but the tracking of these are not consistent.. the project only has this one graphic.. so i don't know what else can be controlled to make it where when i click anywhere inside this button will respond as a click action.. notice the solid color is an alpha blend.. i was thinking maybe 0 alpha pixels click "Through" while solid count, but it doesn't seem to be the case with this example.

    Any insight on this would be super helpful.. i'm working hard to get this done and this is a really silly bug i can't seem to get past having spent a lot of time trying different things to work around it with no luck

    Thanks!

    Caleb

  • You need to fix the collision polygon for the sprite.

  • ok i did another test here to see if this might be something someone can look at.. the exact same problem is happening in this simple example as my full blown project..

    https://www.dropbox.com/s/7unguiia8x6bz ... e%201.capx

    notice how you you can click the back button but the tracking of these are not consistent.. the project only has this one graphic.. so i don't know what else can be controlled to make it where when i click anywhere inside this button will respond as a click action.. notice the solid color is an alpha blend.. i was thinking maybe 0 alpha pixels click "Through" while solid count, but it doesn't seem to be the case with this example.

    Any insight on this would be super helpful.. i'm working hard to get this done and this is a really silly bug i can't seem to get past having spent a lot of time trying different things to work around it with no luck

    Thanks!

    Caleb

    You need to fix the collision polygon for the sprite.

    Edit: ops, I didn't see

    it's because the collision of button maybe, i fix it and is work fine for me... you make like a "hole" on the collision <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile">

  • ok that's awesome! thanks for looking at that.. i NEVER click that button to mess with it so i never would have thought to look at what was going on there. I guess C2 likes to just try and auto-adjust? I'll be sure to always check that in the future.

    Thanks!

    Caleb

  • I was having this issue as I had real tight icons, this fixed me right up, thank you!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)