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. Similar concepts may not exist in other AR frameworks such as AR Foundation. Usually, the behavior of the relative relationships between objects in them is consistent with the *SessionOrigin* mode here.*
The relative transform between Camera and some AR components is controlled by the session. One of the objects is called CenterObject. It remains stationary in the scene, and other objects move relative to this CenterObject. This object is selected according to the value of CenterMode.
CenterObject represents 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`. A `Target` can be an object containing the TargetController component. When using the sparse spatial map and EasyAR Mega, the actual central GameObject is the specifically located map or block object under the root node, and CenterObject is the parent node of this object.
In the FirstTarget or SpecificTarget mode, when a `target` is not recognized or lost in a certain frame, CenterObject may become another `target`. If no `target` is found within the frame, CenterObject will degrade in sequence to the center of the first available mode among SessionOrigin and Camera.
The relative positional relationship between a `Target` and Camera is controlled by the current session. The relative positional 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 = 0The 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 = 1The 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 = 2The 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 = 3The 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.