Some implementation on GetPortalOrientation.