October 2017
Intermediate to advanced
548 pages
13h 23m
English
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#):
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 ...