{"__v":0,"_id":"58796781cd4a9c37007c970c","category":{"version":"58796781cd4a9c37007c96ef","project":"571fa55ca0acd42000af9545","_id":"58796781cd4a9c37007c96fa","__v":0,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2017-01-01T17:04:07.774Z","from_sync":false,"order":12,"slug":"3d-controls","title":"3D Controls"},"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-01T17:04:41.684Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":1,"body":"## Overview\n\nAll 3D controls extend the `VRTK_Control` abstract class which provides a default set of methods and events that all of the subsequent controls expose.\n\n## Inspector Parameters\n\n * **Interact Without Grab:** If active the control will react to the controller without the need to push the grab button.\n\n## Class Variables\n\n * `public ValueChangedEvent OnValueChanged` - Emitted when the control is interacted with.\n * `public enum Direction` - 3D Control Directions\n  * `autodetect` - Attempt to auto detect the axis\n  * `x` - X axis\n  * `y` - Y axis\n  * `z` - Z axis\n\n## Class Events\n\n * `ValueChanged` - Emitted when the 3D Control value has changed.\n\n## Unity Events\n\nAdding the `VRTK_Control_UnityEvents` component to `VRTK_Control` object allows access to `UnityEvents` that will react identically to the Class Events.\n\n * `OnValueChanged` - Emits the ValueChanged class event.\n\n## Event Payload\n\n * `float value` - The current value being reported by the control.\n * `float normalizedValue` - The normalized value being reported by the control.\n\n## Class Methods\n\n### GetValue/0\n\n  > `public float GetValue()`\n\n  * Parameters\n   * _none_\n  * Returns\n   * `float` - The current value of the control.\n\nThe GetValue method returns the current value/position/setting of the control depending on the control that is extending this abstract class.\n\n### GetNormalizedValue/0\n\n  > `public float GetNormalizedValue()`\n\n  * Parameters\n   * _none_\n  * Returns\n   * `float` - The current normalized value of the control.\n\nThe GetNormalizedValue method returns the current value mapped onto a range between 0 and 100.\n\n### SetContent/2\n\n  > `public void SetContent(GameObject content, bool hideContent)`\n\n  * Parameters\n   * `GameObject content` - The content to be considered within the control.\n   * `bool hideContent` - When true the content will be hidden in addition to being non-interactable in case the control is fully closed.\n  * Returns\n   * _none_\n\nThe SetContent method sets the given game object as the content of the control. This will then disable and optionally hide the content when a control is obscuring its view to prevent interacting with content within a control.\n\n### GetContent/0\n\n  > `public GameObject GetContent()`\n\n  * Parameters\n   * _none_\n  * Returns\n   * `GameObject` - The currently stored content for the control.\n\nThe GetContent method returns the current game object of the control's content.","excerpt":"","slug":"vrtk_control","type":"basic","title":"VRTK_Control"}
## Overview All 3D controls extend the `VRTK_Control` abstract class which provides a default set of methods and events that all of the subsequent controls expose. ## Inspector Parameters * **Interact Without Grab:** If active the control will react to the controller without the need to push the grab button. ## Class Variables * `public ValueChangedEvent OnValueChanged` - Emitted when the control is interacted with. * `public enum Direction` - 3D Control Directions * `autodetect` - Attempt to auto detect the axis * `x` - X axis * `y` - Y axis * `z` - Z axis ## Class Events * `ValueChanged` - Emitted when the 3D Control value has changed. ## Unity Events Adding the `VRTK_Control_UnityEvents` component to `VRTK_Control` object allows access to `UnityEvents` that will react identically to the Class Events. * `OnValueChanged` - Emits the ValueChanged class event. ## Event Payload * `float value` - The current value being reported by the control. * `float normalizedValue` - The normalized value being reported by the control. ## Class Methods ### GetValue/0 > `public float GetValue()` * Parameters * _none_ * Returns * `float` - The current value of the control. The GetValue method returns the current value/position/setting of the control depending on the control that is extending this abstract class. ### GetNormalizedValue/0 > `public float GetNormalizedValue()` * Parameters * _none_ * Returns * `float` - The current normalized value of the control. The GetNormalizedValue method returns the current value mapped onto a range between 0 and 100. ### SetContent/2 > `public void SetContent(GameObject content, bool hideContent)` * Parameters * `GameObject content` - The content to be considered within the control. * `bool hideContent` - When true the content will be hidden in addition to being non-interactable in case the control is fully closed. * Returns * _none_ The SetContent method sets the given game object as the content of the control. This will then disable and optionally hide the content when a control is obscuring its view to prevent interacting with content within a control. ### GetContent/0 > `public GameObject GetContent()` * Parameters * _none_ * Returns * `GameObject` - The currently stored content for the control. The GetContent method returns the current game object of the control's content.