Collision accuracy / Alternative to HitTestObject?


(Wellarrived) #1

Hi guys,

I find myself embarassed about collision handling in FlashPunk in general. The collide () functions are useful but limited if i want my object to follow the graphic of a particular kind of terrain, instead of just detecting a collision between my object and a square hitbox of my terrain.

Is there any alternative for the AS3 hitTestObject method in Flashpunk, something that would allow a more accurate detection, such as which direction my object come from ? I know i could use Sprite, but losing the interaction with the Entity class.

Thanks !


(Jacob Albano) #2

Sounds like a Pixelmask might be just the thing.