There's more...

We could extend this behavior by adding more rays, such as whiskers, in order to achieve better accuracy. Also, it is usually paired with other movement behaviors, such as Pursue, using blending:

The original ray cast and possible extensions for more precise wall avoidance