How to Use ARCore's Instant Preview and Motion Tracking Features

In the first installment of the "Create a new type of user interaction experience using ARCore" series, we shared some of the creative ideas that teach you how to use lighting estimates to implement new user interactions and game experiences. In the second article, we will share more use cases and let you know how to use ARCore's instant preview and motion tracking capabilities.

Can you imagine playing "pumping block" games in AR? If you do not understand this game, here is a brief introduction. It is played by gradually removing the towers of the building block by removing the building blocks from the building blocks and putting them on the top of the tower. In this article, we will share some more practical methods, including using ARCore's motion tracking function to build hand-held AR game “pumping blocks” or using AR session pause function to help ARCore applications keep users when losing focus. The degree of participation.

Motion tracking and distance judgment

With motion tracking, you can achieve a lot of effects, including: triggering animation based on the position and orientation of the device, and using the device as a physical bumper based on the distance between the device and the digital object. “

"Pumping blocks" is an interesting case of applying AR distance detection. By using the distance information between the device and the digital building tower, you can move around the tower blocks, looking for blocks to move, and then using simple and familiar gestures to move Blocks, put it to the top of the tower.

This is a very interesting ARCore experience. In this case, you will directly control the digital objects by using familiar and simple operations. For example: hold the block on the screen to hold it, and then move the device to find the right position. Open your fingers and let go of the blocks. User interaction based on distance and motion tracking will continue to play an important role in the same function of handheld AR.

Pause AR session

usingSystem.Collections;

usingSystem.Collections.Generic;

usingUnityEngine;

usingGoogleARCore;

publicclassPauseAR:MonoBehaviour

{

publicARCoreSession SessionController;

privateboolm_sessionPaused=false;

publicvoidTooglePauseMode()

{

If(SessionController==null)

{

Return;

}

SessionController.enabled=m_sessionPaused;

m_sessionPaused=!m_sessionPaused;

}

}

The pause function of the AR application not only allows the user to take a short break. This feature has other useful points worth mentioning, such as the ability to pause sessions between rounds in a single-device multiplayer game, or to allow users to answer calls while using an AR application without losing the call before the application Information.

AR activity has been suspended, UI has appeared on the screen, after the end of the suspension the plane and the flowers are back

Note that the pause is temporary. If the user moves too far and the application can't find the original plane or feature point again, the items in the AR may be lost after the pause.

Instant preview

The Instant Preview feature has been added to ARCore v1.1.0 for Unity. It can only be used in Unity. When you build your project in Unity, this tool allows you to skip the build process and test changes to the AR application directly on the ARCore support device. This will reduce the process time from minutes to milliseconds, allowing you to iterate in the Unity editor in near real-time, check the status of objects, debug errors, and view the position and size ratio of objects.

Developers directly compare images in the real world in Unity to better test and iterate the object material

The instant preview function is on-line and is used by default in ARCore v1.1.0 for Unity. Developers are welcome to use it!

AC Contactor

Ac Contactor,Contactor For Ac Unit,Compressor Contactor,Air Conditioner Contactor

NanJing QUANNING electric Co.,Ltd , https://www.quanningtrading.com