A Note on Obata’s Rigidity Theorem