An interesting part of what I did this week was my detection implementation. The initial goal was to create an accurate cone of vision for the parent. I decided that an easy way to do detection that would not see through walls would be to use Unity's line-cast or ray-cast systems. So I created an object that would take a start point, an angle, and a distance for line casting. It also had a line render attached to it so that the detection could be displayed. From here I wrote a generator script that took in an angle range and a transform and then created these line renders around the given transform. In the picture above I have a parent with a range from 0-70 degrees creating a cone like shape of vision.
In this second picture the kid is in range of the parent but is not detected because the line-cast does not go past other objects.