Sign in to follow this  
lpbr

Click area is off of the picture

Recommended Posts

I was posting this thread at the wrong place (it was in Phaser 2).

OK, I am having a very bad time with clickable objects. It works perfectly on desktop browser but when I run it on my Android mobile the hot spot is totally off. Please refer to the attached picture to have an idea what I am talking about.

The blue square is the clickable object (it's a .png picture). Tapping the object won't fire the input event but if I tap around the position where I draw the marquee it will. In other words, the clickable area is off of the picture.

I found this thread where the OP had a similar issue and mentioned that is could be related to the mobile devicePixelRatio when using Phaser.CANVAS but I couldn't establish a coherent relationship between the DPR and the displacement (otherwise it could be "compensated" with code).

I really cannot see how to solve this. I am about to give up Phaser and try a different engine. Any idea?

model.jpg

Share this post


Link to post
Share on other sites
1 hour ago, lpbr said:

It works perfectly on desktop browser but when I run it on my Android mobile the hot spot is totally off.

This sounds like the same Android bug.

 

Share this post


Link to post
Share on other sites
21 hours ago, samme said:

This sounds like the same Android bug.

 

Hey samme, good morning!

I just made a quick test and it seems to have worked... The click spot area seems to be matching my pictures now.

I just hope to not have more weird "surprises" like that. I will make more tests later today as I have a bunch of spot areas like that one.

Thanks a lot for now, my friend!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.