[Solved] trouble with clicking a graphic with alpha space

Get help using Construct 2

Post » Mon Mar 03, 2014 4:49 pm

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
Last edited by part12studios on Mon Mar 03, 2014 10:04 pm, edited 1 time in total.
B
59
S
9
G
1
Posts: 943
Reputation: 6,555

Post » Mon Mar 03, 2014 4:52 pm

@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.
B
14
S
4
G
1
Posts: 61
Reputation: 1,459

Post » Mon Mar 03, 2014 4:57 pm

Also checked out all your buttons, everything work's fine for me.
B
14
S
4
G
1
Posts: 61
Reputation: 1,459

Post » Mon Mar 03, 2014 5:38 pm

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
B
59
S
9
G
1
Posts: 943
Reputation: 6,555

Post » Mon Mar 03, 2014 7:36 pm

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
B
59
S
9
G
1
Posts: 943
Reputation: 6,555

Post » Mon Mar 03, 2014 7:43 pm

You need to fix the collision polygon for the sprite.
You do not have the required permissions to view the files attached to this post.
B
55
S
29
G
19
Posts: 1,520
Reputation: 25,670

Post » Mon Mar 03, 2014 7:49 pm

part12studios wrote: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


ramones wrote: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 :)
B
21
S
9
Posts: 298
Reputation: 2,967

Post » Mon Mar 03, 2014 10:03 pm

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
B
59
S
9
G
1
Posts: 943
Reputation: 6,555

Post » Sat Mar 15, 2014 6:42 pm

I was having this issue as I had real tight icons, this fixed me right up, thank you!
B
25
S
10
G
3
Posts: 154
Reputation: 2,843


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 28 guests