Improved portal collision checking