Table of Contents

Enum ARSession.ARCenterMode

Namespace
easyar
Assembly
EasyAR.Sense.dll

AR Center Mode.

*Note: There are a total of four center modes in the EasyAR Sense Unity Plugin. There may be no similar concept in other AR frameworks such as AR Foundation. Usually, the behavior of the relative relationship between objects in them is consistent with the *SessionOrigin* mode here.

Camera and the relative transform between a part of AR components are controlled by the session. One of the objects is called CenterObject, which does not move in the scene, and other objects move relative to this CenterObject. This object is selected according to the value of CenterMode.

CenterObject indicates an object that does not move in the Unity space or the parent node of this object. It may be Origin, Camera or a certain `target`. `Target` can be an object containing TargetController or BlockRootController components. When using sparse spatial maps and EasyAR Mega, the actual center GameObject is the map or block object specifically located under the root node, and CenterObject is the parent node of this object.

In the *FirstTarget* or SpecificTarget mode, when `target` is not recognized or lost in a certain frame, CenterObject may become other `target`. And if `target` is not found in the frame, CenterObject will degenerate into the center of the first available mode in SessionOrigin and Camera in sequence.

The relative position relationship between `Target` and Camera is controlled by the current session. The relative position relationship between Origin and Camera is also controlled by the current session when IsCameraUnderControl is true. When IsCameraUnderControl is false, it is not controlled by the current session and is usually controlled by other AR frameworks such as AR Foundation.

public enum ARSession.ARCenterMode

Fields

FirstTarget = 0

The current session is centered on the first tracked `target`.

You can move or rotate the `target`, and Camera will move accordingly. In this mode, you will not be able to manually control the transform of Camera. If any motion tracking is running, Origin will also move, and its transform cannot be manually controlled.

When the `target` is lost, the center object will be recalculated. When using sparse spatial maps and EasyAR Mega, the actual center GameObject is the map or block object specifically located under the root node. Moreover, locating a new map will be regarded as a loss from the positioning process of the previous map, and the center object will be recalculated.

Camera = 1

The current session is centered on Camera.

You can move or rotate Camera, and the `target` will move accordingly. In this mode, you will not be able to manually control the transform of the `target`. If any motion tracking is running, Origin will also move, and its transform cannot be manually controlled.

SpecificTarget = 2

The current session is centered on SpecificTargetCenter.

You can move or rotate the `target`, and Camera will move accordingly. In this mode, you will not be able to manually control the transform of Camera. If any motion tracking is running, Origin will also move, and its transform cannot be manually controlled.

SessionOrigin = 3

The current session is centered on Origin.

You can move or rotate Origin, and Camera will move accordingly. In this mode, you will not be able to manually control the transform of Camera. If any `target` is being tracked, it will also move, and its transform cannot be manually controlled.