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

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.