Coulda, woulda, shoulda-stop whining. Obito has been the main protagonist since Minato's and Kushina's sacrifice to save Naruto. He was a young boy who was nearly crushed to death, gave his eye to the friend he trusted to take care of the girl he loved, only to end up seeing that friend kill the girl and the sensei he believed in no where around to prevent any of it. That could push anyone over the deep end especially if they fall into the hands of someone who was as warped as Madara.
He knew Rinn cared about Kakashi, but like most teenage boys he probably thought with time he could change that. He wasn't a pedo. She was more than just someone he cared about. He had no family and she was the only person who truly believed in him. She would call him on his lies and expect him to do better. She knew and believed in his dream to become Hokage. She was his reason to be better and do better. He lost all that was important to him in a very short time and had nothing but the ravings of an old sick Madara to listen to for years while he was healing.
His ravings as you call them, to Naruto, was because he saw himself in Naruto. He saw the person he could have been and was fascinated by it. Naruto didn't just TNJ Obito he also showed him the way through his actions. Now Obito is going to take action to weaken Madara so the alliance can defeat him. He's redeeming himself so he can die with some of the honor he lost. Possibly he'll save Naruto too before he dies.
The story would not have been as good without Obito.