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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.