Jump to content

Complex shapes in phaser


solinari6
 Share

Recommended Posts

Can you create complex shapes in phaser?

I want to draw a rectangle, and then subtract a circle from the center of the rectangle (so you can get a small circular window into what is behind the rectangle).

But I'm not seeing any way that is possible ... I see a few things about seeing if shapes interact, but don't see anything about subtracting one shape from another.

Link to comment
Share on other sites

Thanks ... I just gave that a shot, and it appears it did the OPPOSITE of what I wanted :)

 

Looks like that mask lays the circle on top of the rectangle, and only shows those parts that both have in common  (which means it just shows a circle).

What I'm looking for is to overlay the circle on top of the rectangle, and DELETE the parts that both have in common from the sprite. I guess it's a inverted mask?

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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