Wikitude Unity Plugin
Public Member Functions | List of all members
Wikitude.TransformOverride Class Referenceabstract

The Transform Override class allows you to intercept any Transform changes made by the SDK and modify them as required. The Transform Override needs to be added to the WikitudeCamera in the inspector to take effect. More...

Inherits MonoBehaviour.

Public Member Functions

abstract void DrawableOverride (Trackable trackable, RecognizedTarget target, ref Vector3 position, ref Quaternion rotation, ref Vector3 scale)
 Called whenever a Trackable or Drawable (in the case of multiple targets) is about to be updated. This is called when Static Camera is enabled, or when multiple targets are being tracked. More...
 
abstract void CameraOverride (Trackable trackable, Transform camera, RecognizedTarget target, ref Vector3 position, ref Quaternion rotation, ref Vector3 scale)
 Called whenever the camera is about to be updated. This is only called when Static Camera is disabled. More...
 
abstract void ImagePreviewOverride (Trackable trackable, float imageTargetHeight, ref Vector3 position, ref Quaternion rotation, ref Vector3 scale)
 When pressing the Preview button in the ImageTrackable inspector, a preview quad will appear in the scene view that allows you to align the augmentations with the target. If the transforms are modified using the DrawableOverride or CameraOverride methods, this preview will no longer be accurate, unless it is corrected here. More...
 

Detailed Description

The Transform Override class allows you to intercept any Transform changes made by the SDK and modify them as required. The Transform Override needs to be added to the WikitudeCamera in the inspector to take effect.

Member Function Documentation

abstract void Wikitude.TransformOverride.CameraOverride ( Trackable  trackable,
Transform  camera,
RecognizedTarget  target,
ref Vector3  position,
ref Quaternion  rotation,
ref Vector3  scale 
)
pure virtual

Called whenever the camera is about to be updated. This is only called when Static Camera is disabled.

Parameters
trackableThe Trackable that is being tracked. When multiple targets are being tracked, this correspondes to the anchor trackable around which the camera rotates.
cameraThe camera that is about to be updated.
targetThe target that is driving the position of the camera. In the case of multiple targets, this would be the anchor around which the camera is rotating.
positionThe position component of the transformation that will be applied.
rotationThe rotation component of the transformation that will be applied.
scaleThe scale component of the transformation that will be applied.
abstract void Wikitude.TransformOverride.DrawableOverride ( Trackable  trackable,
RecognizedTarget  target,
ref Vector3  position,
ref Quaternion  rotation,
ref Vector3  scale 
)
pure virtual

Called whenever a Trackable or Drawable (in the case of multiple targets) is about to be updated. This is called when Static Camera is enabled, or when multiple targets are being tracked.

Parameters
trackableThe Trackable that is going to be modified.
targetThe target associated with this update. In the case of multiple targets, you can access the affected Drawable through the target.
positionThe position component of the transformation that will be applied.
rotationThe rotation component of the transformation that will be applied.
scaleThe scale component of the transformation that will be applied.
abstract void Wikitude.TransformOverride.ImagePreviewOverride ( Trackable  trackable,
float  imageTargetHeight,
ref Vector3  position,
ref Quaternion  rotation,
ref Vector3  scale 
)
pure virtual

When pressing the Preview button in the ImageTrackable inspector, a preview quad will appear in the scene view that allows you to align the augmentations with the target. If the transforms are modified using the DrawableOverride or CameraOverride methods, this preview will no longer be accurate, unless it is corrected here.

Parameters
trackableThe Trackable associated with this preview.
imageTargetHeightThe image target height of the previewed target
positionThe position component of the transformation that will be applied.
rotationThe rotation component of the transformation that will be applied.
scaleThe scale component of the transformation that will be applied.