I've been looking for a way to find the actual "dihedral" angle between a plane (ARPlaneAnchor) and the local gravitational plane. Think "calculating the grade of a wheelchair ramp (i.e. its slope) using data from an iPhone."
I realize that this is very roughly provided in the alignment
member of an ARPlaneAchor, as either .horizontal
or .vertical
, but what about planes in between? Presumably ARKit is using this angle to classify a plane as horizonal or vertical.
Is there an easy way to access the raw data, or to otherwise access that infomation?
I have also looked at the "CaptureSample" example, in which I can get a gravity
vector using CoreMotion, but there's no obvious way to correlate what's in a scene with gravity.