changed logic to detect AABB crossing.
modified.
optimize settings.