For the Touch UI input to work, we need to add colliders to each element that the user needs to engage with.
You can use any kind of collider for the collision detection, however we have created a Rect Transform Collider component that will aid in creating a Box Collider that will automatically resize to the extends of your UI elements.
The Avatar Touch Trigger component's purpose is to communicate collisions to attached components by sending the same messages that a regular UI click would.
There are a number of options for filtering unwanted collisions and haptic feedback which are detailed below.
|Click Event||When to send the 'click' event|
|Ignore Backface Collision||Disallow colliders entering from the back face of the UI, based on the position and forwards vector of this object's Transform|
|Required Collider Name||Required GameObject name of the colliding object. Set to null/empty to bypass the check.|
When using the included Avatar Prefabs you may want to set this to "IndexFinger_END" to only process fingertip pressses.
|Enable Haptics||If true, will send a haptic pulse on the pointer click event|
|Haptic Amplitude||Amplitude of the haptic pulse|
|Haptic Duration||Duration of the haptic pulse|
Updated about 1 year ago