I am using ARView.raycast to find out information about a given estimatedPlane in front of the camera, and I want to treat horizontal results differently than vertical.
It seems that when using .any in the alignment argument, a lot of the results returned are .any (not .horizontal or .vertical), and very few are explicitly horizontal or vertical. Conversely, if I raycast for just one alignment, I get plenty of results in the alignment I request, so I think many of those .any results are being inferred to a .horizontal or .vertical result when you don't use the .any alignment option.
So what is the best way for me to do that same kind of inference on .any results so that I can categorize them by horizontal and vertical alignments? I see there is a worldTransform, and I also see that when I print the description of the result I get something like this:
<ARRaycastResult: 0x281598370 target=estimatedPlane worldTransform=<translation=(-0.176499 -0.960197 -1.208480) rotation=(90.00° 0.00° -3.60°)>>
So under the hood the description is converting the quaternion into Euler degrees. Is there a built-in function to do this? The one I have tried does not return results that line up with the raycast result description values.