WorldTrackingResetEvent
ClassIf a DeviceTracking component is present in the scene, this event is triggered when the tracking is restarted (typically when the Lens starts, or if the user…
- Available on all platforms
If a DeviceTracking component is present in the scene, this event is triggered when the tracking is restarted (typically when the Lens starts, or if the user taps the ground).
Index
Properties
Methods
Example
// Resets the local position to (0,0,0) when tracking resets
function onSurfaceReset(eventData)
{
script.getTransform().setLocalPosition(new vec3(0, 0, 0));
}
var worldTrackingResetEvent = script.createEvent("SurfaceTrackingResetEvent");
worldTrackingResetEvent.bind(onSurfaceReset);
Extends
Properties
enabled
enabled:
boolean
If true, the event is able to trigger. If false, the event will not trigger.
Default Value
true
Inherited from
Methods
bind()
bind(
evCallback):void
Binds a callback function to this event.
Parameters
| Parameter | Type |
|---|---|
evCallback | (arg1) => void |
Returns
void
Inherited from
getTypeName()
staticgetTypeName():TypeName<WorldTrackingResetEvent>
Returns the fully-qualified JavaScript type name for this class (for example, "Component.Camera"). This is a static accessor (no instance required) and returns the same value as the instance getTypeName().
Returns
TypeName<WorldTrackingResetEvent>
Overrides
getTypeName()
getTypeName():
string
Returns the typename of the SceneEvent.
Returns
string
Inherited from
isOfType()
isOfType(
type):boolean
Returns true if the object matches or derives from the passed in type.
Parameters
| Parameter | Type |
|---|---|
type | string |
Returns
boolean
Inherited from
isSame()
isSame(
other):boolean
Returns true if this object is the same as other. Useful for checking if two references point to the same thing.
Parameters
| Parameter | Type |
|---|---|
other | ScriptObject |
Returns
boolean