Plugged in the ray-cube intersection test. Hopefully it works.