@Joe_Ward
Hi, I'm trying to do the same thing:
I have added a UI Button to the scene and placed the Button object in the "First Selected" parameter in the Event System. So when I press the spacebar it works - I additionally have the button onclick calling a script which works. However, I cannot get the LEAP hands to interact with the button despite the button having a box collider and is trigger enabled and having a script attached to the button that looks like this:
using UnityEngine;
using System.Collections;
public class buttonTest : MonoBehaviour {
void OnTriggerEnter(Collider col)
{
switch (col.tag)
{
case "Button":
Debug.Log("BUTTON TRIGGERED");
break;
}
}
void OnCollisonEnter(Collider col)
{
switch (col.tag)
{
case "Button":
Debug.Log("BUTTON COLLISION");
break;
}
}
}
Why are neither OnTriggerEnter or OnCollisonEnter triggered when I try to click the button with the LEAP hands?