protected virtual void SetupColliders() { createColliders = false; Collider[] foundColliders = VRTK_SharedMethods.GetCollidersInGameObjects(new GameObject[] { gameObject }, true, true); if (foundColliders.Length == 0) { Object defaultColliderPrefab = Resources.Load(VRTK_SDK_Bridge.GetControllerDefaultColliderPath(controllerReference.hand)); if (defaultColliderPrefab == null) { VRTK_Logger.Error(VRTK_Logger.GetCommonMessage(VRTK_Logger.CommonMessageKeys.SDK_OBJECT_NOT_FOUND, "default collider prefab", "Controller SDK")); return; } createColliders = true; customColliderContainer = Instantiate(defaultColliderPrefab) as GameObject; customColliderContainer.transform.SetParent(transform); customColliderContainer.transform.localPosition = Vector3.zero; customColliderContainer.transform.localRotation = Quaternion.identity; customColliderContainer.transform.localScale = Vector3.one; customColliderContainer.name = VRTK_SharedMethods.GenerateVRTKObjectName(true, "Controller", "TrackedCollidersContainer"); foundColliders = VRTK_SharedMethods.GetCollidersInGameObjects(new GameObject[] { gameObject }, true, true); } trackedColliders = foundColliders; Collider[] touchColliders = interactTouch.ControllerColliders(); for (int touchColliderIndex = 0; touchColliderIndex < touchColliders.Length; touchColliderIndex++) { for (int trackedColliderIndex = 0; trackedColliderIndex < trackedColliders.Length; trackedColliderIndex++) { Physics.IgnoreCollision(touchColliders[touchColliderIndex], trackedColliders[trackedColliderIndex], true); } } }