Hi everyone,
I'm working on a project that requires detecting hand collision with objects, and I know many others have asked before, but somehow I can't get the hand to be a RigidHand. I have a test sphere set up with RigidBody physics and IsTrigger set to on, and I've added the script for OnTriggerEnter to it (from another thread: here is the code from there):
private bool IsHand(Collider other)
{
if (other.transform.parent && other.transform.parent.parent && other.transform.parent.parent.GetComponent<HandModel>())
return true;
else
return false;
}
void OnTriggerEnter(Collider other)
{
if (IsHand(other))
{
Debug.Log("Yay! A hand collided!");
}
}
I'm not sure why my LeapHandController doesn't give me the option to set the physics models to RigidHand. I worked on the PinchDraw detector utility starter code, so what I have is the prefab that came with it. Any hints would be appreciated!