{"_id":"594949e62be16d0026ec04f0","category":{"_id":"594949e62be16d0026ec04d8","version":"594949e52be16d0026ec04cd","project":"571fa55ca0acd42000af9545","__v":0,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2017-01-01T16:58:11.374Z","from_sync":false,"order":10,"slug":"presence","title":"Presence"},"project":"571fa55ca0acd42000af9545","parentDoc":null,"user":"571fa519db52d01700f5cf3d","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-01T16:58:49.335Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":3,"body":"## Overview\n\nThe purpose of the Headset Collision Fade is to detect when the user's VR headset collides with another game object and fades the screen to a solid colour.\n\nThis is to deal with a user putting their head into a game object and seeing the inside of the object clipping, which is an undesired effect. The reasoning behind this is if the user puts their head where it shouldn't be, then fading to a colour (e.g. black) will make the user realise they've done something wrong and they'll probably naturally step backwards.\n\nThe Headset Collision Fade uses a composition of the Headset Collision and Headset Fade scripts to derive the desired behaviour.\n\n## Inspector Parameters\n\n * **Time Till Fade:** The amount of time to wait until a fade occurs.\n * **Blink Transition Speed:** The fade blink speed on collision.\n * **Fade Color:** The colour to fade the headset to on collision.\n * **Headset Collision:** The VRTK Headset Collision script to use when determining headset collisions. If this is left blank then the script will need to be applied to the same GameObject.\n * **Headset Fade:** The VRTK Headset Fade script to use when fading the headset. If this is left blank then the script will need to be applied to the same GameObject.\n\n## Example\n\n`VRTK/Examples/011_Camera_HeadSetCollisionFading` has collidable walls around the play area and if the user puts their head into any of the walls then the headset will fade to black.","excerpt":"","slug":"vrtk_headsetcollisionfade","type":"basic","title":"VRTK_HeadsetCollisionFade"}

VRTK_HeadsetCollisionFade


## Overview The purpose of the Headset Collision Fade is to detect when the user's VR headset collides with another game object and fades the screen to a solid colour. This is to deal with a user putting their head into a game object and seeing the inside of the object clipping, which is an undesired effect. The reasoning behind this is if the user puts their head where it shouldn't be, then fading to a colour (e.g. black) will make the user realise they've done something wrong and they'll probably naturally step backwards. The Headset Collision Fade uses a composition of the Headset Collision and Headset Fade scripts to derive the desired behaviour. ## Inspector Parameters * **Time Till Fade:** The amount of time to wait until a fade occurs. * **Blink Transition Speed:** The fade blink speed on collision. * **Fade Color:** The colour to fade the headset to on collision. * **Headset Collision:** The VRTK Headset Collision script to use when determining headset collisions. If this is left blank then the script will need to be applied to the same GameObject. * **Headset Fade:** The VRTK Headset Fade script to use when fading the headset. If this is left blank then the script will need to be applied to the same GameObject. ## Example `VRTK/Examples/011_Camera_HeadSetCollisionFading` has collidable walls around the play area and if the user puts their head into any of the walls then the headset will fade to black.