What kind of sensor could be used to detect shadow shapes?
Instead of a light source and casting a shadow on the wall, just put the camera where the light source would be and develop a filter to differentiate blank wall form the intervening object, hand, or whatever would cast the shadow.

With a little care you can probably also have a light source co-located with the camera, if you want to still cast a shadow for the benefit of observers at other vantage points.