I use **distance based** collision detection in my project, in other words, **circular** collision detection. But it **does not meet my** needs exactly. If I can do somewhat **elliptical shaped** collision detection with based on the **width** and **height** values, it will solve the problem. Unfortunately I couldn't design the algorithm for this. I found some topics about this on the Internet but I couldn't see a useful answer.

**SOLUTION:**

private function compareAsEllipticArea(obj1:DisplayObject, obj2:DisplayObject, adjustment:Number = 0):Boolean { var x0:Number = obj1.x; var y0:Number = obj1.y; var x1:Number = obj2.x; var y1:Number = obj2.y; var xDif:Number = (x0 - x1) * (x0 - x1); var yDif:Number = (y0 - y1) * (y0 - y1); var xRad:Number = obj1.width * obj2.width * 0.25; var yRad:Number = obj1.height * obj2.height * 0.25; return xDif / xRad + yDif / yRad <= 1 + adjustment; }

it can be improved, this is the **basically** required algorithm.