{"__v":0,"_id":"58796782cd4a9c37007c9747","category":{"version":"58796781cd4a9c37007c96ef","project":"571fa55ca0acd42000af9545","_id":"58796781cd4a9c37007c96f4","__v":0,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2017-01-01T16:45:52.489Z","from_sync":false,"order":6,"slug":"interactions","title":"Interactions"},"parentDoc":null,"project":"571fa55ca0acd42000af9545","user":"571fa519db52d01700f5cf3d","version":{"__v":4,"_id":"58796781cd4a9c37007c96ef","project":"571fa55ca0acd42000af9545","createdAt":"2017-01-13T23:49:21.393Z","releaseDate":"2017-01-13T23:49:21.393Z","categories":["58796781cd4a9c37007c96f0","58796781cd4a9c37007c96f1","58796781cd4a9c37007c96f2","58796781cd4a9c37007c96f3","58796781cd4a9c37007c96f4","58796781cd4a9c37007c96f5","58796781cd4a9c37007c96f6","58796781cd4a9c37007c96f7","58796781cd4a9c37007c96f8","58796781cd4a9c37007c96f9","58796781cd4a9c37007c96fa","58796781cd4a9c37007c96fb","58796781cd4a9c37007c96fc","58796781cd4a9c37007c96fd","58796781cd4a9c37007c96fe","58796781cd4a9c37007c96ff","58796781cd4a9c37007c9700","58b157ca1756cf370022f90d","58b1596f5dae732f00adeca2","58b1605a5dae732f00adecb1"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"Mukota","version_clean":"3.1.0","version":"3.1.0"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2017-01-01T16:48:13.899Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":8,"body":"## Overview\n\nThe Interact Controller Appearance script is attached on the same GameObject as an Interactable Object script and is used to determine whether the controller model should be visible or hidden on touch, grab or use.\n\n## Inspector Parameters\n\n * **Hide Controller On Touch:** Hides the controller model when a valid touch occurs.\n * **Hide Delay On Touch:** The amount of seconds to wait before hiding the controller on touch.\n * **Hide Controller On Grab:** Hides the controller model when a valid grab occurs.\n * **Hide Delay On Grab:** The amount of seconds to wait before hiding the controller on grab.\n * **Hide Controller On Use:** Hides the controller model when a valid use occurs.\n * **Hide Delay On Use:** The amount of seconds to wait before hiding the controller on use.\n\n## Class Methods\n\n### ToggleControllerOnTouch/3\n\n  > `public virtual void ToggleControllerOnTouch(bool showController, VRTK_ControllerActions controllerActions, GameObject obj)`\n\n  * Parameters\n   * `bool showController` - If true then the controller will attempt to be made visible when no longer touching, if false then the controller will be hidden on touch.\n   * `VRTK_ControllerActions controllerActions` - The controller to apply the visibility state to.\n   * `GameObject obj` - The object that is currently being interacted with by the controller which is passed through to the visibility to prevent the object from being hidden as well.\n  * Returns\n   * _none_\n\nThe ToggleControllerOnTouch method determines whether the controller should be shown or hidden when touching an interactable object.\n\n### ToggleControllerOnGrab/3\n\n  > `public virtual void ToggleControllerOnGrab(bool showController, VRTK_ControllerActions controllerActions, GameObject obj)`\n\n  * Parameters\n   * `bool showController` - If true then the controller will attempt to be made visible when no longer grabbing, if false then the controller will be hidden on grab.\n   * `VRTK_ControllerActions controllerActions` - The controller to apply the visibility state to.\n   * `GameObject obj` - The object that is currently being interacted with by the controller which is passed through to the visibility to prevent the object from being hidden as well.\n  * Returns\n   * _none_\n\nThe ToggleControllerOnGrab method determines whether the controller should be shown or hidden when grabbing an interactable object.\n\n### ToggleControllerOnUse/3\n\n  > `public virtual void ToggleControllerOnUse(bool showController, VRTK_ControllerActions controllerActions, GameObject obj)`\n\n  * Parameters\n   * `bool showController` - If true then the controller will attempt to be made visible when no longer using, if false then the controller will be hidden on use.\n   * `VRTK_ControllerActions controllerActions` - The controller to apply the visibility state to.\n   * `GameObject obj` - The object that is currently being interacted with by the controller which is passed through to the visibility to prevent the object from being hidden as well.\n  * Returns\n   * _none_\n\nThe ToggleControllerOnUse method determines whether the controller should be shown or hidden when using an interactable object.\n\n## Example\n\n`VRTK/Examples/008_Controller_UsingAGrabbedObject` shows that the controller can be hidden when touching, grabbing and using an object.","excerpt":"","slug":"vrtk_interactcontrollerappearance","type":"basic","title":"VRTK_InteractControllerAppearance"}

VRTK_InteractControllerAppearance


## Overview The Interact Controller Appearance script is attached on the same GameObject as an Interactable Object script and is used to determine whether the controller model should be visible or hidden on touch, grab or use. ## Inspector Parameters * **Hide Controller On Touch:** Hides the controller model when a valid touch occurs. * **Hide Delay On Touch:** The amount of seconds to wait before hiding the controller on touch. * **Hide Controller On Grab:** Hides the controller model when a valid grab occurs. * **Hide Delay On Grab:** The amount of seconds to wait before hiding the controller on grab. * **Hide Controller On Use:** Hides the controller model when a valid use occurs. * **Hide Delay On Use:** The amount of seconds to wait before hiding the controller on use. ## Class Methods ### ToggleControllerOnTouch/3 > `public virtual void ToggleControllerOnTouch(bool showController, VRTK_ControllerActions controllerActions, GameObject obj)` * Parameters * `bool showController` - If true then the controller will attempt to be made visible when no longer touching, if false then the controller will be hidden on touch. * `VRTK_ControllerActions controllerActions` - The controller to apply the visibility state to. * `GameObject obj` - The object that is currently being interacted with by the controller which is passed through to the visibility to prevent the object from being hidden as well. * Returns * _none_ The ToggleControllerOnTouch method determines whether the controller should be shown or hidden when touching an interactable object. ### ToggleControllerOnGrab/3 > `public virtual void ToggleControllerOnGrab(bool showController, VRTK_ControllerActions controllerActions, GameObject obj)` * Parameters * `bool showController` - If true then the controller will attempt to be made visible when no longer grabbing, if false then the controller will be hidden on grab. * `VRTK_ControllerActions controllerActions` - The controller to apply the visibility state to. * `GameObject obj` - The object that is currently being interacted with by the controller which is passed through to the visibility to prevent the object from being hidden as well. * Returns * _none_ The ToggleControllerOnGrab method determines whether the controller should be shown or hidden when grabbing an interactable object. ### ToggleControllerOnUse/3 > `public virtual void ToggleControllerOnUse(bool showController, VRTK_ControllerActions controllerActions, GameObject obj)` * Parameters * `bool showController` - If true then the controller will attempt to be made visible when no longer using, if false then the controller will be hidden on use. * `VRTK_ControllerActions controllerActions` - The controller to apply the visibility state to. * `GameObject obj` - The object that is currently being interacted with by the controller which is passed through to the visibility to prevent the object from being hidden as well. * Returns * _none_ The ToggleControllerOnUse method determines whether the controller should be shown or hidden when using an interactable object. ## Example `VRTK/Examples/008_Controller_UsingAGrabbedObject` shows that the controller can be hidden when touching, grabbing and using an object.