Jump to content

Problem: Collision on alpha regions


beuleal
 Share

Recommended Posts

Hey,

 

I'm not happy with my collion.

 

Example: i have a "sun" sprite. it is basically a circle with alpha parts for the blur.  When i use collide/overlap, phaser consider the blur, but i dont want it! 

 

Someone can ask: Why didnt u create a circle and use it to collide? Yeah, it works! but i have the moon with the same properties and isnt a circle!

 

Help me guys!

Link to comment
Share on other sites

sorry but if your sun is a circle.. use a cirle as hitbox.. you need to use p2 physics for that of course .. then you could also use polygons to define half moon shapes precisely..

if you expect phaser to automatically adjust the hitbox you will always get a rectangle in the size of your image

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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