Table of Contents

Enum ARSession.ARCenterMode

Espacio de nombres
easyar
Ensayo
EasyAR.Sense.dll

AR center mode.

*Note: There are four center modes in EasyAR Sense Unity Plugin. Similar concepts may not exist in other AR frameworks such as AR Foundation; usually, the relative relationship behavior between objects in those frameworks is consistent with the *SessionOrigin* mode here.*

The relative transform between Camera and some AR components is controlled by session. One of the objects is called CenterObject; it stays still in the scene, and other objects move relative to this CenterObject. This object is selected according to the value of CenterMode.

CenterObject represents the object that does not move in Unity space, or the parent node of that object. It may be Origin, Camera, or a `target`. A `Target` can be an object containing the TargetController component. When using Sparse Spatial Map and EasyAR Mega, the actual center GameObject is the specific localized map or block object under the root node, and CenterObject is the parent node of this object.

In FirstTarget or SpecificTarget mode, when a `target` is not recognized or is lost in a frame, CenterObject may become another `target`. If no `target` can be found in the frame, CenterObject degrades in order to the center of the first available mode among SessionOrigin and Camera.

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 another AR framework such as AR Foundation.

public enum ARSession.ARCenterMode

Campos

FirstTarget = 0

The current session esta centrada en the first tracked `target`.

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

After the `target` is lost, the center object is recalculated. When using Sparse Spatial Map and EasyAR Mega, the actual center GameObject is the specific localized map or block object under the root node. Also, localizing a new map will be treated as losing the previous map localization process, and the center object will be recalculated.

Camera = 1

The current session esta centrada en Camera.

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

SpecificTarget = 2

The current session esta centrada en SpecificTargetCenter.

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

SessionOrigin = 3

The current session esta centrada en Origin.

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