问题
UnityARAlignment
public enum UnityARAlignment
{
UnityARAlignmentGravity,
UnityARAlignmentGravityAndHeading,
UnityARAlignmentCamera
}
As picture show, there are three options in Start Alignment. I want to know that what is the use of each option? What is their performance? I can't find the relevant information online.
回答1:
They are not documented yet but are ported based on ARConfiguration.WorldAlignment enum in ARKit. The UnityARAlignmentGravity
, UnityARAlignmentGravityAndHeading
and UnityARAlignmentCamera
enum values are mapped to Apple's ARKit gravity, gravityAndHeading and camera respectively.
From the Apple doc, below are short definition for them. Click on each one to read more about them. This mostly has nothing to do with performance but instead helps configure the orientation of the camera or compass.
UnityARAlignment enum is equivalent to ARConfiguration.WorldAlignment - Options for how ARKit constructs a scene coordinate system based on real-world device motion.
UnityARAlignmentGravity - The coordinate system's y-axis is parallel to gravity, and its origin is the initial position of the device.
UnityARAlignmentGravityAndHeading - The coordinate system's y-axis is parallel to gravity, its x- and z-axes are oriented to compass heading, and its origin is the initial position of the device.
UnityARAlignmentCamera - The scene coordinate system is locked to match the orientation of the camera.
来源:https://stackoverflow.com/questions/50716817/what-does-unityaralignment-mean-in-unity-arkit-plugins