Blind implementation of math approch for dragging portals.