{"__v":0,"_id":"58796782cd4a9c37007c9755","category":{"version":"58796781cd4a9c37007c96ef","project":"571fa55ca0acd42000af9545","_id":"58796781cd4a9c37007c96f1","__v":0,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2016-07-31T16:56:01.612Z","from_sync":false,"order":1,"slug":"prefabs","title":"Prefabs"},"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":"2016-07-31T17:35:55.593Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":7,"body":"## Overview\n\nThis adds a UI element into the world space that can be dropped into a Controller object and used to create and use Radial Menus from the touchpad.\n\nIf the RadialMenu is placed inside a controller, it will automatically find a `VRTK_ControllerEvents` in its parent to use at the input. However, a `VRTK_ControllerEvents` can be defined explicitly by setting the `Events` parameter of the `Radial Menu Controller` script also attached to the prefab.\n\nThe RadialMenu can also be placed inside a `VRTK_InteractableObject` for the RadialMenu to be anchored to a world object instead of the controller. The `Events Manager` parameter will automatically be set if the RadialMenu is a child of an InteractableObject, but it can also be set manually in the inspector. Additionally, for the RadialMenu to be anchored in the world, the `RadialMenuController` script in the prefab must be replaced with `VRTK_IndependentRadialMenuController`. See the script information for further details on making the RadialMenu independent of the controllers.\n\n## Inspector Parameters\n\n * **Buttons:** An array of Buttons that define the interactive buttons required to be displayed as part of the radial menu.\n * **Button Prefab:** The base for each button in the menu, by default set to a dynamic circle arc that will fill up a portion of the menu.\n * **Generate On Awake:** If checked, then the buttons will be auto generated on awake.\n * **Button Thickness:** Percentage of the menu the buttons should fill, 1.0 is a pie slice, 0.1 is a thin ring.\n * **Button Color:** The background colour of the buttons, default is white.\n * **Offset Distance:** The distance the buttons should move away from the centre. This creates space between the individual buttons.\n * **Offset Rotation:** The additional rotation of the Radial Menu.\n * **Rotate Icons:** Whether button icons should rotate according to their arc or be vertical compared to the controller.\n * **Icon Margin:** The margin in pixels that the icon should keep within the button.\n * **Is Shown:** Whether the buttons are shown\n * **Hide On Release:** Whether the buttons should be visible when not in use.\n * **Execute On Unclick:** Whether the button action should happen when the button is released, as opposed to happening immediately when the button is pressed.\n * **Base Haptic Strength:** The base strength of the haptic pulses when the selected button is changed, or a button is pressed. Set to zero to disable.\n * **Menu Buttons:** The actual GameObjects that make up the radial menu.\n\n## Example\n\n`VRTK/Examples/030_Controls_RadialTouchpadMenu` displays a radial menu for each controller. The left controller uses the `Hide On Release` variable, so it will only be visible if the left touchpad is being touched. It also uses the `Execute On Unclick` variable to delay execution until the touchpad button is unclicked. The example scene also contains a demonstration of anchoring the RadialMenu to an interactable cube instead of a controller.","excerpt":"","slug":"radialmenu","type":"basic","title":"Radial Menu"}
## Overview This adds a UI element into the world space that can be dropped into a Controller object and used to create and use Radial Menus from the touchpad. If the RadialMenu is placed inside a controller, it will automatically find a `VRTK_ControllerEvents` in its parent to use at the input. However, a `VRTK_ControllerEvents` can be defined explicitly by setting the `Events` parameter of the `Radial Menu Controller` script also attached to the prefab. The RadialMenu can also be placed inside a `VRTK_InteractableObject` for the RadialMenu to be anchored to a world object instead of the controller. The `Events Manager` parameter will automatically be set if the RadialMenu is a child of an InteractableObject, but it can also be set manually in the inspector. Additionally, for the RadialMenu to be anchored in the world, the `RadialMenuController` script in the prefab must be replaced with `VRTK_IndependentRadialMenuController`. See the script information for further details on making the RadialMenu independent of the controllers. ## Inspector Parameters * **Buttons:** An array of Buttons that define the interactive buttons required to be displayed as part of the radial menu. * **Button Prefab:** The base for each button in the menu, by default set to a dynamic circle arc that will fill up a portion of the menu. * **Generate On Awake:** If checked, then the buttons will be auto generated on awake. * **Button Thickness:** Percentage of the menu the buttons should fill, 1.0 is a pie slice, 0.1 is a thin ring. * **Button Color:** The background colour of the buttons, default is white. * **Offset Distance:** The distance the buttons should move away from the centre. This creates space between the individual buttons. * **Offset Rotation:** The additional rotation of the Radial Menu. * **Rotate Icons:** Whether button icons should rotate according to their arc or be vertical compared to the controller. * **Icon Margin:** The margin in pixels that the icon should keep within the button. * **Is Shown:** Whether the buttons are shown * **Hide On Release:** Whether the buttons should be visible when not in use. * **Execute On Unclick:** Whether the button action should happen when the button is released, as opposed to happening immediately when the button is pressed. * **Base Haptic Strength:** The base strength of the haptic pulses when the selected button is changed, or a button is pressed. Set to zero to disable. * **Menu Buttons:** The actual GameObjects that make up the radial menu. ## Example `VRTK/Examples/030_Controls_RadialTouchpadMenu` displays a radial menu for each controller. The left controller uses the `Hide On Release` variable, so it will only be visible if the left touchpad is being touched. It also uses the `Execute On Unclick` variable to delay execution until the touchpad button is unclicked. The example scene also contains a demonstration of anchoring the RadialMenu to an interactable cube instead of a controller.