Closed Unity3D-Hardik closed 1 year ago
Destroy AR Session Game object tested with no luck.
To reset the session, you can use the ARSession.Reset()
API which will also reset the camera position to zero. Note that resetting the ARSession will also destroy all the trackables.
https://docs.unity3d.com/Packages/com.unity.xr.arfoundation@5.0/api/UnityEngine.XR.ARFoundation.ARSession.html#UnityEngine_XR_ARFoundation_ARSession_Reset
I also tested the samples from main
for AR Foundation 5.0.2 on 2021.3.10f1 and couldn't reproduce the issue. The camera reset back to zero when switching scene and when pressing "Reset" button from the SimpleAR scene.
How are you checking the camera position?
I have test that. this only work if we pass reference in button and then call reset method. but if we try to get AR Session runtime in script and Call that method its not working.
Please file a bug and post your case number here so our QA team can take a look: https://unity3d.com/unity/qa/bug-reporting
I am using AR Foundation 4.2.6 , and can reproduce with sample code as well. Unity version 2021.3.10
Not able to reproduce in AR foundation 5.0.2.
Closing as resolved since the issue is not reproducible. If it start to occur again then feel free to file a bug with Unity: https://unity3d.com/unity/qa/bug-reporting
How do I... Hello, Any one know how we can reset AR Session after switching scene. ?
Issue : Camera position not going to Vector.zero
How to reproduce :
Any one know how can i reset AR Scene camera Position ?
I am using Unity 2021.3.10 and Latest AR Foundation GitHub repository sample