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
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;
}