Select to view content in your preferred language

3d Navigation with Xbox Controller

2559
3
02-06-2018 12:27 PM
RichieCarmichael
Esri Contributor
4 3 2,559

This is an experimental project to test the effectiveness of using a Microsoft Xbox controller to navigate in 3d web applications built using Esri's ArcGIS API for JavaScript.  This work was inspired by a customer that illustrated the difficulty of navigating underwater in a custom web application.

Click here for the live application.

Click here for the source code.

To date we have only testing the app on Windows 10 desktops.  We suspect that drivers for both Xbox 360 and Xbox One controllers are bundled with Windows 10.

How Do I Fly?

Button/AxisDescription
Left AxisHorizontal movement. Adjust to move the observer forward, back, left and right.
Right AxisLook. Adjust to change the horizontal and vertical angle of observation.
Left TriggerDescend.
Right TriggerAscend.
Left BumperZoom to previous web scene slide.
Right BumperZoom to next web scene slide.
A Button (green)Perform identify on the currently selected scene layer object.
B Button (red)Hide identify window.
Menu ButtonShow controller button map.
Start ButtonReset controller. This is used to reset the "at rest" values for the controller.

Don't Like This Map?

By default, the application loads this San Diego web scene.  This can be customized with a webscene url argument, for example.
https://richiecarmichael.github.io/gamepad/index.html?webscene=f85419bfd3414e1696c389dd9b6e9360

Known Issues

  • When the app starts, the camera may spontaneously creep without any controller interaction. Occasionally it may be an erratic spin. To correct this, after a few seconds press the start button. This will reset the controller.
  • Occasionally when the app starts, scene layers (e.g. buildings) may no fully load. To correct this refresh the browser and wait 5-10 seconds before using the controller.

Caveats

  • The app is experimental. The app is based on draft implementations of the gamepad API in modern browsers (see W3C and MDN for details).
  • The app has not been tested with a Sony PlayStation controller.
3 Comments
SamanthaGoodchild-Brown
Regular Contributor

This is fabulous. I am desperate to use a gamepad for this and working with my 3d data and even in 2d Data and tables in PRO. Has any further work been done on this? I have an old 360 controller I tried but could only find ref to using it within games in windows. The instructions here are a bit over my head, hence my query about further developments.

RichieCarmichael
Esri Contributor

Hi @SamanthaGoodchild-Brown 

This posting discusses an early prototype that used an Xbox gamepad to navigate in 3D web apps.

Not long after this posting, the ArcGIS API for JavaScript added naive support for gamepads in both 2D and 3D. Gamepad navigation is enabled by default for any compatible gamepad (including Xbox and PlayStation).

For more information on using gamepads in MapView please click here.

For more information on using gamepads in SceneView please click here.

SamanthaGoodchild-Brown
Regular Contributor

Oh wonderful. That is great news. Now I just need to get an xbox 360 wireless receiver.