Update ObjectManager.cpp

Corrected distance formula