Jump to content

Interactivity and Mask


Ninjadoodle
 Share

Recommended Posts

Hi @enpu

Getting pretty close to finishing up my game, but I've run into a problem with interactivity and masking.

Basically, I have a large grid of clickable tiles, that is masked, and only a small square portion of the grid is visible in the center of the screen.

Currently I'm controlling the movement of the grid with a couple of buttons on the screen.

I've found that the clickable tiles that are masked are still interactive. To workaround, I would have to workout the positions of the tiles that are not masked and only then enable interactivity.

Is there a way to make masked sprites non-interactive?

Thank you in advance!

Link to comment
Share on other sites

Having the hit area change dynamically based on the mask would be really complicated and heavy. That would mean if the sprite is only partly masked, the interactive hit area would also need to work only partly?

I think you need to rethink your design a little bit there. Maybe have four empty containers with custom hit areas in top of the grid? That would prevent the user from clicking the masked sprites?

Link to comment
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...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...