VR/XR - how to rotate/move in a scene which contains an ArcGIS Map

4273
14
Jump to solution
06-27-2022 11:25 AM
coryeicher
Occasional Contributor

Hi,

I'm looking for some guidance -- or nudge in the right direction -- for how to rotate (and eventually move) in a scene which contains an ArcGIS Map. I have deployed an app to Oculus Quest 2 goggles, but I can only see the map data. When I rotate the goggles the view rotates with me (not expected... since I can't look around in my view). I'm trying to get expected rotation to work as a first step towards interaction/locomotion with an Esri map.

I've followed the Unity and Oculus doc + online examples, but I've been unable to set up an XR Rig in a way which is compatible with an ArcGIS Map and ArcGIS Camera. Per Esri "the Camera game object must have the ArcGIS Camera component and be a child of an ArcGIS Map game object" (link). At a high level it seems like the support the ArcGIS Camera and Location are adding to be able to display map data is _not_ compatible with recommended pattern for supporting camera rotation/position in VR goggles.

How then to set up an XR Rig and configure the arcgis camera to rotate/move the camera in VR goggles?

This seems like a common need for the Esri user community.

Beyond what I summarized above (XR Rig/Camera), I have also configured my scene's camera (including ArcGIS Camera) with a Tracked Pose Driver, but nothing is working. What I see is either of these two states:

A) "native" Unity objects + camera rotating as expected... but no map data visible

B) ArcGIS Map data visible... but with a) no support for camera rotation and b) no support for camera movement (not really expecting this yet given what I have tried and how the Esri camera-controller is written)

What is the recommended path forward from here? Is there a recommended set-up for an XR Rig which works with an ArcGIS Camera? Or, should I be starting the process of writing my own camera controller without any XR Rig (i.e. replacing this https://developers.arcgis.com/unity/maps/camera/#camera-controller)?

Thanks,

=Cory

CORY EICHER
www.eichcorp.com
cory@eichcorp.com
Tags (1)
0 Kudos
14 Replies
coryeicher
Occasional Contributor

Hi Nick,

Glad to hear of your successes with movement and snap turning. 

I am no longer seeing the rotation issue you described. I found that organizing scenes like the hierarchies above (I posted two above... one from Esri and one from my app) were key to getting continuous movement to work...

... Off-hand I do not know what could be the solution to make the view rotate with the goggles/HMD... One thing I saw though....When I followed NON-VR Esri documentation/tutorial, built for Android, and deployed to Oculus Quest 2 goggles, I saw the same issue you describe. I had to modify the hierarchy to have the scene rotate when goggles rotate.

-Cory

 

CORY EICHER
www.eichcorp.com
cory@eichcorp.com
LDD_NW
by
New Contributor II

Hi Cory,

I was able to get it all functioning. As you said, the organization of the hierarchies that you have posted works to remove the issue, I just had an error in my XR rig.

Thanks,

Nick

0 Kudos
Matt_Nelson
Esri Contributor

We have a PR in progress to add the VR sample. We still need to do some polishing but you can check this out but just understand there could be some slight adjustments https://github.com/Esri/arcgis-maps-sdk-unity-samples/pull/40

coryeicher
Occasional Contributor

Hi Matt

Thx for posting. I took a look at this for a few today. Couple things:

1)  I did not get too far because I could not get the project set up following the instructions. Are there different steps or known issues (as you said, PR not quite ready)? The `main` branch samples worked for me when I set up a couple mos ago.

2) The samples PR mentions support for `Oculus Rift S (in Unity)`. Any thought to supporting `Oculus Quest 2`? I was going to test the sample on that device here.... Oculus Rift S has been discontinued AFAIK. 

-Cory

CORY EICHER
www.eichcorp.com
cory@eichcorp.com
0 Kudos
Matt_Nelson
Esri Contributor

Yes we definitely want to support the Oculus Quest 2. I just came back from vacation so I will see what I can do to get this PR working for you needs. Give me a couple days.