Find the center of an object

I did it, but still not the desired result. The color should change when the arrowhead of the character points to the center of the object.