Motion detection game using mobile camera

I want to make simple character running game which uses motion detection with the help of mobile camera. So when we act as running, runner starts running. How can I integrate with mobile camera. I am new to unreal engine 4 and don’t know how to do it. Can anybody help?