Sensor based camera trigger