I would like to obtain the user’s head information from NrealLight’s CenterCamera and have the scene change when it collides with an object displayed in AR. Is it possible?
Could you please show me the code?
Hi, you can try to get the Pose of the device in NRFrame.cs, and use it to detect collision. But I have to tell you that the scene change is not supported in the current SDK, maybe you can check if there is this kind of API in Unity.
thank you.
How do I use NRFrame.cs on Unity? Thank you for your guidance.
a quick and good way is to add a Collider on NRCameraRig for collission detection between your head and the rest of the scene objects.
Regarding scene changes what I do is only have my NRCameraRig and input controllers ons my main scene and then load others scenes in with SceneManager.LoadSceneAsync (sceneName, LoadSceneMode.Additive); After the load you just connect the input controllers to your scene controller.
Thank you for your guidance.
Is it better to set Collision to NRCameraRig?
Or would CenterCamera inside NRCameraRig be better?
I am talking under correction but I think CameraRig would more or less be center taling between left and right. I think it might be more forward than back, but that does not matter because I think there is a 30cm limit that is rendered. Anything closer than this limit to the camera is not rendered.
You can add to Rig and see how it looks, then put it on center camera to see how it looks. The more correct place might not always be the better place experience wise. I always play with different ideas to see how it works when experienced through glasses. Science is mathematically correct but sometimes you need to break it to make it more fun
Thank you for your guidance!
Very helpful.
We will continue to develop it!
Best of luck with your project