But let me shed some light on him for a bit. While it's true that Rin was a huge part of the process - what did it ultimately lead to? Being hospitalized by Madara, Obito slowly learns of Madara's wish: to put the world in a dream-like state where you can have all the benefits of life without the negative sides like hatred and pain. Doesn't sound bad, does it? Of course Obito isn't willing to comply yet; he has the Leaf Village and his friends to look forward too. So he stays for a couple of years(months?) until one day, where Zetsu tells him that his greatest friends were in danger. Caring for them deeply, Obito doesn't think twice about rushing to save them. He does manage to get there, but he doesn't like what he sees.
His best friend, Kakashi, killing Rin right in front of his eyes. The one thing that Obito had asked him to do after "sacrificing" himself to save Kakashi, became the exact opposite of what Kakashi did. At this point, Obito's mad. The mist's ninja are charging in to finish off Kakashi and take Rin's body as well. What does he do? Slaughters them all. Out of all of this madness, Obito begins to question why such pain should exist in this world. He had never felt true pain like this before. What was this world? He could only describe it as hell. Remember that dream-like state Madara was talking about? It looks 1000x better now.
Again while a lot of people are stressing about his overreaction to Rin's death, look a bit deeper. Throughout the chapters before Tobi's reveal, he constantly gave extra emphasis on the plan little by little. Heroes cannot guarantee the safety of everybody and their dreams? Check. Hope seems like a weak attempt at looking at reality a different way? Many people in real life think so as well. Believing this world to be corrupt beyond hope? Check. He even says that Kakashi can't be blamed, and that this is merely a fault of the world they live in.