Pan tilt hat camera

Hey,

any idea whether is possible to change code here https://learn.pimoroni.com/tutorial/electromechanical/building-a-pan-tilt-face-tracker

to make the servo motor moves according to the movement of the object,

can this be done by changing the cascade from face to whole body?

thank you