Sign in to follow this  
achexi

PIXI masking, masking the sprites interactivity

Recommended Posts

Hey, So I'm making a drag and drop type application in pixi that masks sprites if the mouse is inside a box. It looks like this: http://gyazo.com/e658aef16a76b78014c6892eee5c82bd

 

Now the problem is I'm trying out pixi's interactive mode to do the dragging, but as you can see from the gif although the sprite is masked, its still clickable outside the box. I'm just wondering if theres any neat way's of negating the clicking, maybe using some built in functions that I'm unaware of. I can think of a few ways of doing it, right now the way I will probably do it will be simple checks on the bounds to see if I'm allowed to select it.

Share this post


Link to post
Share on other sites

I forgot about hitarea! It definitely would be more efficient to adjust the size of that. Now I'm gonna assume there is no built in pixi function that allows me to mask the hitarea? Looks like i'll probably have to do it myself but thanks anyway.

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.