Sharpleaf Posted February 17, 2015 Share Posted February 17, 2015 I'd like to see a way to make a hitarea visible without having to make a new graphics object.Something as simple as sprite.hitarea.display = true; Is this a feasible request? Is it something that I could even anticipate? Thanks! Quote Link to comment Share on other sites More sharing options...
digibo Posted February 18, 2015 Share Posted February 18, 2015 My guess is this would be an overkill to include this as something built-in in PIXI, especially if it's made to work as a simple property. You can create a simple debug function that goes through the Stage's child graph, checks for a hitarea and creates a corresponding graphics object (probably setting the same x/y and adding it to the parent). Shouldn't be more than a few lines of code. Quote Link to comment Share on other sites More sharing options...
achexi Posted February 18, 2015 Share Posted February 18, 2015 You probably should just extend sprite and make your own. As digibo said its not something that should be included in a rendering engine built for speed, although I wonder how much of a performance impact it would actually have... Quote Link to comment Share on other sites More sharing options...
hexdecks Posted February 18, 2015 Share Posted February 18, 2015 When I test my hitAreas(s) I simply draw a graphics primitive in place. Seems to work okay for my purposes. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.