reverted to transformed distance query in getFrameClosest