modified to detect AABB cross.
update a setting.