{"_id":"5b1f90befd653400031d960d","project":"571fa55ca0acd42000af9545","version":{"_id":"5b1f8576c2505d00031254db","project":"571fa55ca0acd42000af9545","__v":4,"forked_from":"594949e52be16d0026ec04cd","createdAt":"2017-06-20T16:14:29.816Z","releaseDate":"2017-06-20T16:14:29.816Z","categories":["5b1f8576c2505d0003125424","5b1f8576c2505d0003125425","5b1f8576c2505d0003125426","5b1f8576c2505d0003125427","5b1f8576c2505d0003125428","5b1f8576c2505d0003125429","5b1f8576c2505d000312542a","5b1f8576c2505d000312542b","5b1f8576c2505d000312542c","5b1f8576c2505d000312542d","5b1f8576c2505d000312542e","5b1f8576c2505d000312542f","5b1f8576c2505d0003125430","5b1f8576c2505d0003125431","5b1f8576c2505d0003125432","5b1f8576c2505d0003125433","5b1f8576c2505d0003125434","5b1f8576c2505d0003125435","5b1f8576c2505d0003125436","5b1f8576c2505d0003125437","5b1f8576c2505d0003125438","5b1f8aab9c683000032979e7","5b1f8b2f3073470003ffa5da","5b1f8bd9fd653400031d94f4","5b1f900bd4c5f000036b57bd"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"Mangalica","version_clean":"3.3.0","version":"3.3.0"},"category":{"_id":"5b1f900bd4c5f000036b57bd","project":"571fa55ca0acd42000af9545","version":"5b1f8576c2505d00031254db","__v":0,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2018-06-12T09:19:07.462Z","from_sync":false,"order":6,"slug":"interactors","title":"Interactors"},"user":"571fa519db52d01700f5cf3d","githubsync":"","__v":0,"parentDoc":null,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2018-06-12T09:22:06.195Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":3,"body":"## Overview\n\nDetermines if a GameObject can initiate a near touch with an Interactable Object.\n\n**Required Components:**\n * `VRTK_InteractTouch` - The touch component to determine the actual interacting GameObject that will deal with the near touch interaction. This must be applied on the same GameObject as this script if one is not provided via the `Interact Touch` parameter.\n\n**Script Usage:**\n * Place the `VRTK_InteractNearTouch` script on either:\n   * The Interact Touch GameObject.\n   * Any other scene GameObject and provide a valid `VRTK_InteractTouch` component to the `Interact Touch` parameter of this script.\n\n## Inspector Parameters\n\n * **Collider Radius:** The radius of the auto generated collider if a `Custom Collider Container` is not supplied.\n * **Custom Collider Container:** An optional GameObject that contains the compound colliders to represent the near touching object. If this is empty then the collider will be auto generated at runtime.\n * **Interact Touch:** The Interact Touch script to associate the near touches with. If the script is being applied onto a controller then this parameter can be left blank as it will be auto populated by the controller the script is on at runtime.\n\n## Class Events\n\n * `ControllerNearTouchInteractableObject` - Emitted when a valid object is near touched.\n * `ControllerNearUntouchInteractableObject` - Emitted when a valid object is no longer being near touched.\n\n## Unity Events\n\nAdding the `VRTK_InteractNearTouch_UnityEvents` component to `VRTK_InteractNearTouch` object allows access to `UnityEvents` that will react identically to the Class Events.\n\n * All C# delegate events are mapped to a Unity Event with the `On` prefix. e.g. `MyEvent` -> `OnMyEvent`.\n\n## Class Methods\n\n### GetNearTouchedObjects/0\n\n  > `public virtual List<GameObject> GetNearTouchedObjects()`\n\n * Parameters\n   * _none_\n * Returns\n   * `List<GameObject>` - A list of GameObjects that are being near touched.\n\nThe GetNearTouchedObjects method returns all of the GameObjects that are currently being near touched.\n\n### ForceNearTouch/1\n\n  > `public virtual void ForceNearTouch(GameObject obj)`\n\n * Parameters\n   * `GameObject obj` - The GameObject to attempt to force near touch.\n * Returns\n   * _none_\n\nThe ForceNearTouch method will attempt to force the controller to near touch the given GameObject.\n\n### ForceStopNearTouching/1\n\n  > `public virtual void ForceStopNearTouching(GameObject obj = null)`\n\n * Parameters\n   * `GameObject obj` - An optional GameObject to only include in the force stop. If this is null then all near touched GameObjects will be force stopped.\n * Returns\n   * _none_\n\nThe ForceStopNearTouching method will stop the Interact Touch GameObject from near touching an Interactable Object even if the Interact Touch GameObject is physically touching the Interactable Object still.\n\n### GetNearTouchedObjects/0\n\n  > `public virtual List<GameObject> GetNearTouchedObjects()`\n\n * Parameters\n   * _none_\n * Returns\n   * `List<GameObject>` - A list of GameObjects that are being near touched.\n\nThe GetNearTouchedObjects method returns all of the GameObjects that are currently being near touched.","excerpt":"","slug":"vrtk_interactneartouch","type":"basic","title":"VRTK_InteractNearTouch"}

VRTK_InteractNearTouch


## Overview Determines if a GameObject can initiate a near touch with an Interactable Object. **Required Components:** * `VRTK_InteractTouch` - The touch component to determine the actual interacting GameObject that will deal with the near touch interaction. This must be applied on the same GameObject as this script if one is not provided via the `Interact Touch` parameter. **Script Usage:** * Place the `VRTK_InteractNearTouch` script on either: * The Interact Touch GameObject. * Any other scene GameObject and provide a valid `VRTK_InteractTouch` component to the `Interact Touch` parameter of this script. ## Inspector Parameters * **Collider Radius:** The radius of the auto generated collider if a `Custom Collider Container` is not supplied. * **Custom Collider Container:** An optional GameObject that contains the compound colliders to represent the near touching object. If this is empty then the collider will be auto generated at runtime. * **Interact Touch:** The Interact Touch script to associate the near touches with. If the script is being applied onto a controller then this parameter can be left blank as it will be auto populated by the controller the script is on at runtime. ## Class Events * `ControllerNearTouchInteractableObject` - Emitted when a valid object is near touched. * `ControllerNearUntouchInteractableObject` - Emitted when a valid object is no longer being near touched. ## Unity Events Adding the `VRTK_InteractNearTouch_UnityEvents` component to `VRTK_InteractNearTouch` object allows access to `UnityEvents` that will react identically to the Class Events. * All C# delegate events are mapped to a Unity Event with the `On` prefix. e.g. `MyEvent` -> `OnMyEvent`. ## Class Methods ### GetNearTouchedObjects/0 > `public virtual List<GameObject> GetNearTouchedObjects()` * Parameters * _none_ * Returns * `List<GameObject>` - A list of GameObjects that are being near touched. The GetNearTouchedObjects method returns all of the GameObjects that are currently being near touched. ### ForceNearTouch/1 > `public virtual void ForceNearTouch(GameObject obj)` * Parameters * `GameObject obj` - The GameObject to attempt to force near touch. * Returns * _none_ The ForceNearTouch method will attempt to force the controller to near touch the given GameObject. ### ForceStopNearTouching/1 > `public virtual void ForceStopNearTouching(GameObject obj = null)` * Parameters * `GameObject obj` - An optional GameObject to only include in the force stop. If this is null then all near touched GameObjects will be force stopped. * Returns * _none_ The ForceStopNearTouching method will stop the Interact Touch GameObject from near touching an Interactable Object even if the Interact Touch GameObject is physically touching the Interactable Object still. ### GetNearTouchedObjects/0 > `public virtual List<GameObject> GetNearTouchedObjects()` * Parameters * _none_ * Returns * `List<GameObject>` - A list of GameObjects that are being near touched. The GetNearTouchedObjects method returns all of the GameObjects that are currently being near touched.