The MoveTool will be the only script that requires ARKit-specific calls. In the Mixed Reality Toolkit, we cast a ray from the camera into the scene and looked for a hit point where it intersects with the spatial map of the environment. For ARKit, we do something similar, but instead of using Unity physics to do the calculation, we use the underlying ARKit SDK directly (from C#):
- Open the MoveTool.cs script and modify it to use mouse events.
- Remove all references to HoloToolkit and spatialMapping.
Then replace the Update() function as follows:
File: MoveTool.cs void Update() { List<ARHitTestResult> hitResults; ARPoint point; if (isEditing) { Vector3 screenPosition = Camera.main.ScreenToViewportPoint(Input.mousePosition); point.x ...