{"action":"closed","issue":{"url":"https://api.github.com/repos/thestonefox/SteamVR_Unity_Toolkit/issues/294","repository_url":"https://api.github.com/repos/thestonefox/SteamVR_Unity_Toolkit","labels_url":"https://api.github.com/repos/thestonefox/SteamVR_Unity_Toolkit/issues/294/labels{/name}","comments_url":"https://api.github.com/repos/thestonefox/SteamVR_Unity_Toolkit/issues/294/comments","events_url":"https://api.github.com/repos/thestonefox/SteamVR_Unity_Toolkit/issues/294/events","html_url":"https://github.com/thestonefox/SteamVR_Unity_Toolkit/issues/294","id":166964054,"number":294,"title":"Wrong touching logic","user":{"login":"stevenwanhk","id":20297911,"avatar_url":"https://avatars.githubusercontent.com/u/20297911?v=3","gravatar_id":"","url":"https://api.github.com/users/stevenwanhk","html_url":"https://github.com/stevenwanhk","followers_url":"https://api.github.com/users/stevenwanhk/followers","following_url":"https://api.github.com/users/stevenwanhk/following{/other_user}","gists_url":"https://api.github.com/users/stevenwanhk/gists{/gist_id}","starred_url":"https://api.github.com/users/stevenwanhk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stevenwanhk/subscriptions","organizations_url":"https://api.github.com/users/stevenwanhk/orgs","repos_url":"https://api.github.com/users/stevenwanhk/repos","events_url":"https://api.github.com/users/stevenwanhk/events{/privacy}","received_events_url":"https://api.github.com/users/stevenwanhk/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":20,"created_at":"2016-07-22T03:35:17Z","updated_at":"2016-07-26T09:42:33Z","closed_at":"2016-07-26T09:42:33Z","body":"First you need to use\r\n `if (collider.gameObject.GetComponent<VRTK_InteractableObject>())`\r\n               ` {`\r\n `                   lastTouchedObject = collider.gameObject;`\r\n               ` }`\r\n                `else`\r\n               ` {`\r\n                    `lastTouchedObject = collider.gameObject.GetComponentInParent<VRTK_InteractableObject>().gameObject;`\r\n               ` }`\r\nin `OnTriggerEnter()`, otherwise it will never equal to `touchedObject` if the collider is not in the same transform with `VRTK_InteractableObject`\r\n\r\nSecond, the current lastTouchedObject logic does not work if you touch 2 items at the same time, `OnTriggerStay()` for 2 different colliders will be called every frame without calling `OnTriggerEnter()`, that's why sometimes my haptic palse keeps activating when I touch 2 InteractableObject at the same time."}}
{"actor":{"display_login":"thestonefox"}}