It is very clear now! Zetsu say that in the genjutsu of Madara the dead people can come back alive! Obito is not going to be an evil person! after Rin dies he only agreed with Madara's plan just to bring her back! do you remember that Kakashi asked why Obito is doing this? Obito said because you let Rin die!