Jump to content

Pixel perfect contain/overlaps or set input point


Recommended Posts

I'm trying to get a pixel perfect detection of an animated sprite sheet and a single point. So in this example at any give check i could see if 'checkpoint' is over 'badguy' but the actual badguy pixels and not the rect:

if (this.badguy.contains(checkpoint.x, checkpoint.y)) {

//do stuff


 It's like an input pixel perfect detection but with a time delay.  I don't need to be constantly checking for the collisoin/contains, only at a single moment in time.  Most of what comes up when looking for this is P2 physics editor collisions but that's not what I'm trying to do.

It might be like the bunny example but I just want to set the input _temp point manually and relay on the mouse poisition:



Is this possible?


Link to comment
Share on other sites


  • Recently Browsing   0 members

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