Quantcast
Channel: Pixi.js Latest Topics
Viewing all articles
Browse latest Browse all 3978

[Question/Help] Can I use a PNG binary mask for hitover area instead of polygon?

$
0
0

Hello, as the title implies, I'm trying to create a hitover area using a PNG binary mask instead of a polygon mask. I couldn't really find something for this in the documentation. Is that possible?

Currently, I start with a PNG binary mask, convert it to a polygon (list of [x,y] coordinates), and then mask my sprites for a hitover area. This works really well when the initial binary mask is well defined and closed. However, if the binary mask has disconnected components, the hitover area yields unwanted actions. Probably due to there being multiple polygons during the mask -> polygon process.

Thanks so much in advance!


Viewing all articles
Browse latest Browse all 3978

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>