HaxePunk/HaxePunk — pull request #170 by azrafe7 (2013-12-10 22:21:37+00:00)
Title: Fixed collisions for Circle and Polygon with other masks - issue #167

Fixed collisions for Circle and Polygon with other masks,
fixed Projection.overlaps() which really means !overlaps,
added pivot point to Polygon.debugDraw(),
still missing support for collisions against SlopedGrid and Pixelmask

I have a Pixelmask implementantion on my port, but requires changes to a couple of classes too. For SlopedGrid I think it support could be added by modeling it on collideGrid(), but I'm not familiar with the class itself.

Here's a testing scene: [https://dl.dropboxusercontent.com/u/32864004/dev/FPDemo/HXPfixcollisions01.swf](https://dl.dropboxusercontent.com/u/32864004/dev/FPDemo/HXPfixcollisions01.swf)

To sync an Image with a Polygon mask now you can use code like this:

```actionscript
image.originX = poly.originX;
image.originY = poly.originY;
image.angle = poly.angle;
image.x = poly.x + poly.originX;
image.y = poly.y + poly.originY;
```