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. In other AR frameworks like AR Foundation, similar concepts may not exist, and the behavior of relative relationships between objects there is usually consistent with the *SessionOrigin*mode here.*

The relative transform between theCameraand some AR components is controlled by the session. One object is called theCenterObject; it remains stationary in the scene, while other objects move relative to thisCenterObject. This object is selected based on the value ofCenterMode.

CenterObject represents the object or its parent node that does not move in Unity space. It could be theOrigin, theCamera, or a specific `target`. A `Target` can be an object containing components likeTargetControllerorBlockRootController. When using sparse spatial maps and EasyAR Mega, the actual centerGameObjectis the specifically located map or block object under the root node, and theCenterObject is the parent of this object.

InFirstTarget or SpecificTargetmode, when a `target` is not recognized or lost in a frame, theCenterObject may become another `target`. If no `target` is found within the frame, theCenterObject will fall back to the center of the first available mode in the order ofSessionOriginandCamera.

The relative positional relationship between the `Target` and theCamerais controlled by the current session. The relative positional relationship between theOrigin and theCamera is also controlled by the current session whenIsCameraUnderControl is true. WhenIsCameraUnderControl is false, it is not controlled by the current session and is usually controlled by other AR frameworks like 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 theCamerawill follow. In this mode, you cannot manually control the transform of theCamera. If any motion tracking is running, theOriginwill also follow, and its transform cannot be manually controlled.

When a `target` is lost, the center object will be recalculated. When using sparse spatial maps and EasyAR Mega, the actual centerGameObjectis the specifically located map or block object under the root node. Furthermore, locating a new map will be considered as a loss during the localization process from the previous map, and the center object will be recalculated.

Camera = 1

The current session is centered on theCamera.

You can move or rotate theCamera, and the `target` will follow. In this mode, you cannot manually control the transform of the `target`. If any motion tracking is running, theOriginwill also follow, and its transform cannot be manually controlled.

SpecificTarget = 2

The current session is centered on theSpecificTargetCenter.

You can move or rotate the `target`, and theCamerawill follow. In this mode, you cannot manually control the transform of theCamera. If any motion tracking is running, theOriginwill also follow, and its transform cannot be manually controlled.

SessionOrigin = 3

The current session is centered on theOrigin.

You can move or rotate theOrigin, and theCamerawill follow. In this mode, you cannot manually control the transform of theCamera. If any `target` is being tracked, it will also follow, and its transform cannot be manually controlled.