Closed ccy317912 closed 4 years ago
When the session begins, the device has identity transform; it is not dependent on compass direction, so, no, ARFoundation does not "realize unity world z-axis-north alignment".
I used "Input.gyro" control camera to made one simple AR ,it's very alignment unity world z-axis-north to the real world north but has some shake. In arfoundation, phone start different direction whether start or lost tracking it's face to unity z-axis.
Sorry, I don't understand. Can you rephrase your explanation?
I put my demo on this link https://github.com/ccy317912/NotAlignmentNorth ,you can install apk on your android phone.its has two scenes ,one is ARFoundation scene,another one is InputGyro scene,i put compass sprite on each scenes ,you will see the ARFoundation scene when start different direction it's face to unity z-axis.
If I understand correctly, you want to align the ARSession with a compass direction. You can compute an appropriate rotation and rotate the ARSession (just update its Transform component).
year,i konw how to do it .can it auto align ?
I want to achieve the goal,but i dont know how to do ,when the phone start different direction,in AR its different direction angle.When AR lost tracking ,its different direction angle again.Would the arfoundation realize unity world z-axis-north alignment the real world north and AR lost tracking?