Touch Button | A simple interaction node for just registering touches. |
The Interaction Transformation Nodes are derived from this node and inherit all its properties. It is the basis of all object-based interaction nodes and represents a basic control element in a user interface.
As outputs, the Touch Button fires a SingleTap event when the user quickly touches the active area of the button (i.e. meshes underneath it). There are two values in the Project Properties that influence this behavior: The maximum movement allowed between the touch press and release as well as the maximum amount of time between press and release. Similar is the TapAndHold event, except that the button must be held some time after the press before the event is fired. The specific threshold can be set in the Project Properties as well.
In addition, the Touch Button fires a number of events to give a more detailed feedback of the state of the interaction node:
To make it easier to implement custom behavior, three additional Boolean properties represent the current state of the Touch Button:
The most important input parameter is the IntersectionType. For performance reasons, the default intersection test only uses the bounding box of each of the underlying meshes. Especially when the geometry has holes, this can lead to very weird results. Setting this to Mesh will cause the intersection to work on the triangles themselves for all meshes underneath the interaction node. This can however cost a lot of performance. For additional tips, see the section on intersection proxy meshes in the Touch Excluder documentation.
Finally, the ControlEnabled flag can be deactivated to preserve all rendering and behavior functionality but prevent the node from receiving any more touches.