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.
|
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...
|
|
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.
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
-
trackable | The Trackable that is being tracked. When multiple targets are being tracked, this correspondes to the anchor trackable around which the camera rotates. |
camera | The camera that is about to be updated. |
target | The 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. |
position | The position component of the transformation that will be applied. |
rotation | The rotation component of the transformation that will be applied. |
scale | The 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
-
trackable | The Trackable that is going to be modified. |
target | The target associated with this update. In the case of multiple targets, you can access the affected Drawable through the target. |
position | The position component of the transformation that will be applied. |
rotation | The rotation component of the transformation that will be applied. |
scale | The 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
-
trackable | The Trackable associated with this preview. |
imageTargetHeight | The image target height of the previewed target |
position | The position component of the transformation that will be applied. |
rotation | The rotation component of the transformation that will be applied. |
scale | The scale component of the transformation that will be applied. |