olsn / Collision-Detection-for-EaselJS

Pixel Perfect and BoundingBox Collision Detector for EaselJS Bitmaps and BitmapAnimations
170 stars 53 forks source link

Doesn't seem to work with Sprites #6

Open RichieLoco opened 10 years ago

RichieLoco commented 10 years ago

This works fine with images but not at all with Sprites. I'm just trying to get something working using Squares at the moment. Any plans to fix?

RichieLoco commented 10 years ago

I should also mention that I'm using checkRectCollision function. Not checkPixelCollision. Many thanks in advance!

olsn commented 10 years ago

You'll have to be a little bit more specific than that - or even better post a jsfiddle with your issue.

The detection only works on loaded images - just in case you are using canvas-operations(draw rect) to create your object, this will not work.

RichieLoco commented 10 years ago

Morning, apologies for being rather vague... I was on the move and just wanted to get a message out quickly when I should have been more thorough. As you mentioned, I was drawing vector shapes (a rect, to be exact). I have actually managed to get it working though. Im busy at work at the moment, I'll go into depth on what I did change when I'm out of the office

MRechtien-zz commented 8 years ago

Hi, I'm actually using checkPixelCollision with sprites! It seems to work 'partly': without digging deep down the source - when checking against straight shapes it works very good indeed, but I have problems with rounded shapes. See attached files where the red-white "walls" are partly straight, partly rounded. The rounded areas do not (always) work when checking collision.

Markus

sceenshot