# CDK Collision help

**URL:** <https://forum.kirupa.com/t/cdk-collision-help/328123>\
**Category:** flash\
**Created:** [April 20, 2012, 10:41pm UTC](https://forum.kirupa.com/t/cdk-collision-help/328123 "2012-04-20T22:41:08Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ineedsleep](https://avatars.discourse-cdn.com/v4/letter/i/e5b9ba/32.png) [@Ineedsleep](https://forum.kirupa.com/u/Ineedsleep)\
**Post date:** [April 20, 2012, 10:41pm UTC](https://forum.kirupa.com/t/cdk-collision-help/328123/1 "2012-04-20T22:41:08Z")

</div>

Im using the collision detection kit I have it mostly working but the collisions are little off.

the object seems to get stuck in the object it is colliding with. I think its todo with the angular velocity but Im still getting to grips with the maths.

Could someone help me

```auto

private function updateScene(e:Event):void{

var collisions:Array = _collisionList.checkCollisions();        
 
if (collisions.length)
            {
                var collision:Object = collisions[0];
                var angle:Number = collision.angle; //returns radians
                var overlap:int = collision.overlapping.length;
                var sin:Number = Math.sin(angle);
                var cos:Number = Math.cos(angle);

                char.vx = Math.cos(angle)* _Xspeed;
                char.yx = Math.sin(angle)* _Yspeed;
                
                
            }
            else
            {
                char.vx += _Xspeed;
                char.vy += _Yspeed;
            }

            char.x += char.vx;
            char.y += char.vy;
}

```
