Jump to content

How to change the "bounds" of a sprite to aid in collision/overlap checking? No physics.


kriket
 Share

Recommended Posts

I am keeping my game lean and be ale to run on mobile, and so I am not using any physics, and checking overlap with 

 

    checkOverlap: function(spriteA, spriteB) {        var boundsA = spriteA.getBounds();        var boundsB = spriteB.getBounds();        return Phaser.Rectangle.intersects(boundsA, boundsB);    },

However, just like we can set body size to get more accurate collisions/overlaps, I want to be able to define such a "hitArea" for plain sprites. Is it possible to do this?

 

 

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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