Wikitude SDK API Reference

API Docs for: 9.13.0
Show:

ActionArea Class

Extends ARchitectObject
Module: AR

An ActionArea defines a certain geo area where actions should be executed on enter and on exit. An ActionArea is a 2-dimensional area, altitude will be ignored. As soon as the user enters the ActionArea, onEnter() will be executed (in case the function is defined). When the user leaves the ActionArea, onExit() will be executed (in case the function is defined).

The boundary of the ActionArea is a part of the Action Area, thus an object located right at the boundary of an ActionArea will be considered to be in the ActionArea.

ActionArea is a superclass for other classes and must not be directly instantiated by the developer.

Item Index

Methods

Properties

Events

Methods

destroy

()

Inherited from ARchitectObject

Destroys the object.

isInArea

(
  • geoLocation
)
Boolean

checks if a certain location is within this ActionArea.

Parameters:

  • geoLocation GeoLocation

    the GeoLocation that should be checked.

Returns:

Boolean:

true if the geoLocation passed to the method is within the ActionArea, false if the geoLocation passed to the method is not in the ActionArea

Properties

destroyed

Boolean

Inherited from ARchitectObject

Indicates if the object has already been destroyed.

enabled

Boolean

Flag to enable/disable the ActionArea. If the ActionArea is disabled, triggers on this ActionArea will never be fired. In case it is enabled, it can fire triggers.

Events

onEnter

The trigger is executed when the user enters the ActionArea.

The trigger is null by default, and will thus result in no action executed when the trigger fires. A developer can add custom functionality by assigning a custom function to onEnter.

onExit

The trigger is executed when the user leaves the ActionArea.

The trigger is null by default, and will thus result in no action executed when the trigger fires. A developer can add custom functionality by assigning a custom function to onExit.