private Vector tireCollisionWithMap(Vector pos, Vector lastPos) { int ticks = 5; Vector spd = (pos - lastPos) / (double)ticks; for (int i = 0; i < ticks; i++) { pos += spd; CollisionCircle collisionTire = new CollisionCircle(pos, game.TireRadius); List <CollisionInfo> collisions = CollisionDetector.CollisionsWithMap(collisionTire); if (!collisions.HasCollision()) { continue; } return(collisions.AverageNormalObj1()); } return(null); }