Added ray casting for object location