Inherits Visometry.VisionLib.SDK.Core.TrackingManagerReference.
Public Member Functions | |
void | Reset () |
Restores the original transformation. More... | |
Data Fields | |
GameObject | arCamera |
AR Camera from ARFoundation More... | |
GameObject | content |
GameObject with the AR content attached to it. More... | |
Camera | initCamera |
Reference to the camera used to define the initial pose. | |
bool | keepUpright = false |
Adapt initial pose to always be upright. More... | |
float | smoothTime = 0.03f |
Interpolation time to apply updates to the content Transform. More... | |
Vector3 | upAxis = Vector3.up |
Defines the up-axis used by the keepUpright option. More... | |
bool | usePoseFromTrackingConfig |
Overwrite camera transformation with values from tracking configuration. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from Visometry.VisionLib.SDK.Core.TrackingManagerReference | |
virtual bool | InitWorkerReference () |
Initializes the trackingManager and Worker member variables. More... | |
virtual void | ResetReference () |
Properties inherited from Visometry.VisionLib.SDK.Core.TrackingManagerReference | |
TrackingManager | trackingManager [get] |
Reference to used TrackingManager. More... | |
Worker | worker [get] |
|
inline |
Restores the original transformation.
This might be useful if the InitCamera was transformed in some awkward way for some reason and we quickly want to restore the original state.
If usePoseFromTrackingConfig is set to false
, then this will restore the transformation during the initialization of the XRTracker. If usePoseFromTrackingConfig is set to true
, then this will restore the transformation from the tracking configuration.
GameObject Visometry.VisionLib.SDK.ARFoundation.XRTracker.arCamera |
AR Camera from ARFoundation
It is automatically created inside the AR Session Origin
Prefab
GameObject Visometry.VisionLib.SDK.ARFoundation.XRTracker.content |
GameObject with the AR content attached to it.
This script will change the transformation of that GameObject according to the tracking result.
bool Visometry.VisionLib.SDK.ARFoundation.XRTracker.keepUpright = false |
Adapt initial pose to always be upright.
This only works correctly, if upAxis actually is the up-axis of the content.
float Visometry.VisionLib.SDK.ARFoundation.XRTracker.smoothTime = 0.03f |
Interpolation time to apply updates to the content Transform.
Set to 0 to directly apply tracking results without smoothing.
Vector3 Visometry.VisionLib.SDK.ARFoundation.XRTracker.upAxis = Vector3.up |
Defines the up-axis used by the keepUpright option.
In Unity usually the y-axis points up.
bool Visometry.VisionLib.SDK.ARFoundation.XRTracker.usePoseFromTrackingConfig |
Overwrite camera transformation with values from tracking configuration.
The InitCamera can then be transformed afterwards, but will get overwritten again after loading a new tracking configuration.