{"_id":"594949e62be16d0026ec04f9","category":{"_id":"594949e62be16d0026ec04da","version":"594949e52be16d0026ec04cd","project":"571fa55ca0acd42000af9545","__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"},"user":"571fa519db52d01700f5cf3d","parentDoc":null,"project":"571fa55ca0acd42000af9545","version":{"_id":"594949e52be16d0026ec04cd","project":"571fa55ca0acd42000af9545","__v":2,"createdAt":"2017-06-20T16:14:29.816Z","releaseDate":"2017-06-20T16:14:29.816Z","categories":["594949e62be16d0026ec04ce","594949e62be16d0026ec04cf","594949e62be16d0026ec04d0","594949e62be16d0026ec04d1","594949e62be16d0026ec04d2","594949e62be16d0026ec04d3","594949e62be16d0026ec04d4","594949e62be16d0026ec04d5","594949e62be16d0026ec04d6","594949e62be16d0026ec04d7","594949e62be16d0026ec04d8","594949e62be16d0026ec04d9","594949e62be16d0026ec04da","594949e62be16d0026ec04db","594949e62be16d0026ec04dc","594949e62be16d0026ec04dd","594949e62be16d0026ec04de","594949e62be16d0026ec04df","594949e62be16d0026ec04e0","594949e62be16d0026ec04e1","59497219f4a8980024dd0631"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"Kunekune","version_clean":"3.2.0","version":"3.2.0"},"__v":0,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2017-01-01T17:06:20.362Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":4,"body":"> extends [VRTK_Control](doc:vrtk_control)\n\n## Overview\n\nTransforms a game object into a door with an optional handle attached to an optional frame. The direction can be freely set and also very reliably auto-detected.\n\nThere are situations when it can be very hard to automatically calculate the correct axis and anchor values for the hinge joint. If this situation is encountered then simply add the hinge joint manually and set these two values. All the rest will still be handled by the script.\n\nThe script will instantiate the required Rigidbodies, Interactable and HingeJoint components automatically in case they do not exist yet. Gizmos will indicate the direction.\n\n## Inspector Parameters\n\n * **Direction:** The axis on which the door should open.\n * **Door:** The game object for the door. Can also be an empty parent or left empty if the script is put onto the actual door mesh. If no colliders exist yet a collider will tried to be automatically attached to all children that expose renderers.\n * **Handles:** The game object for the handles. Can also be an empty parent or left empty. If empty the door can only be moved using the rigidbody mode of the controller. If no collider exists yet a compound collider made up of all children will try to be calculated but this will fail if the door is rotated. In that case a manual collider will need to be assigned.\n * **Frame:** The game object for the frame to which the door is attached. Should only be set if the frame will move as well to ensure that the door moves along with the frame.\n * **Content:** The parent game object for the door content elements.\n * **Hide Content:** Makes the content invisible while the door is closed.\n * **Max Angle:** The maximum opening angle of the door.\n * **Open Inward:** Can the door be pulled to open.\n * **Open Outward:** Can the door be pushed to open.\n * **Min Snap Close:** The range at which the door must be to being closed before it snaps shut. Only works if either inward or outward is selected, not both.\n * **Released Friction:** The amount of friction the door will have whilst swinging when it is not grabbed.\n * **Grabbed Friction:** The amount of friction the door will have whilst swinging when it is grabbed.\n * **Handle Interactable Only:** If this is checked then only the door handle is grabbale to operate the door.\n\n## Example\n\n`VRTK/Examples/025_Controls_Overview` shows a selection of door types, from a normal door and trapdoor, to a door with a cat-flap in the middle.","excerpt":"","slug":"vrtk_door","type":"basic","title":"VRTK_Door"}
> extends [VRTK_Control](doc:vrtk_control) ## Overview Transforms a game object into a door with an optional handle attached to an optional frame. The direction can be freely set and also very reliably auto-detected. There are situations when it can be very hard to automatically calculate the correct axis and anchor values for the hinge joint. If this situation is encountered then simply add the hinge joint manually and set these two values. All the rest will still be handled by the script. The script will instantiate the required Rigidbodies, Interactable and HingeJoint components automatically in case they do not exist yet. Gizmos will indicate the direction. ## Inspector Parameters * **Direction:** The axis on which the door should open. * **Door:** The game object for the door. Can also be an empty parent or left empty if the script is put onto the actual door mesh. If no colliders exist yet a collider will tried to be automatically attached to all children that expose renderers. * **Handles:** The game object for the handles. Can also be an empty parent or left empty. If empty the door can only be moved using the rigidbody mode of the controller. If no collider exists yet a compound collider made up of all children will try to be calculated but this will fail if the door is rotated. In that case a manual collider will need to be assigned. * **Frame:** The game object for the frame to which the door is attached. Should only be set if the frame will move as well to ensure that the door moves along with the frame. * **Content:** The parent game object for the door content elements. * **Hide Content:** Makes the content invisible while the door is closed. * **Max Angle:** The maximum opening angle of the door. * **Open Inward:** Can the door be pulled to open. * **Open Outward:** Can the door be pushed to open. * **Min Snap Close:** The range at which the door must be to being closed before it snaps shut. Only works if either inward or outward is selected, not both. * **Released Friction:** The amount of friction the door will have whilst swinging when it is not grabbed. * **Grabbed Friction:** The amount of friction the door will have whilst swinging when it is grabbed. * **Handle Interactable Only:** If this is checked then only the door handle is grabbale to operate the door. ## Example `VRTK/Examples/025_Controls_Overview` shows a selection of door types, from a normal door and trapdoor, to a door with a cat-flap in the middle.