public void SetVelocityToPlayer(Point adding) { if (adding.IsCollinear(new Point(1, 0))) //Horizontal vector { player.Velocity = new Point(adding.x, player.Velocity.y); } else if (world.IsBodyOnGround(player, PhysicalWorld.acceleration)) { player.Velocity = new Point(player.Velocity.x, adding.y); } }