Foscam presets based on sensor

I swear that I saw this in one of those stories videos. The person is driving into the garage. The preset for the camera is looked at the garage door, then when the door to the house opens, it pans to the door. Any idea how to do this by modes or sensors?

I’d like to use this for my front door camera. When there is no motion at the front door, it looks down the sidewalk. When motion is detected by the door, it pans to the immediate front door.

Any ideas help! Thanks!

I did a search and found some somewhat related questions, but no answers.

Anyone? I’m thinking this has been done before…