Updated Path Finding

The optimizer will now test for three rays:
The direct ray and two additional rays for the bounds of the object.
Also fixed a bug where the optimizer would collide with terrain.