Obito enters the battlefield but he is unable to control himself because of his newly injected DNA. The Mist ninja kill
Rin,hence Kakashi fails to protect Rin. I'm guessing that Obito unlocks the Mangekyo Sharingan,then heads back to Madara,he complains how he can't properly use his powers. Madara then molds a new mask for him with some o
f his chakra infused with it. (The mask with flames) Obito then heads back to the Mist and manipulates the Mizukage and kills him for what his villagers had done to Rin. That's probably the only logical reason he would manipulate Yagura.
Madara tells Obito all about the Leaf and the Uchiha;Obito gets consumed by hatred from hearing his story,and Madara lets him in on his plans. Later,Madara passes away.
Obito sets out with his newly gained knowledge,including when a jinchuuriki's seal becomes weakened. He extracts the fox from Kushina and manipulates it,using it as a weapon against Konoha,but he fails and flees.
A few years later,he confronts Itachi and helps him kill the Uchiha on the behalf of Madara