{"_id":"5b1f8576c2505d0003125452","category":{"_id":"5b1f8576c2505d0003125430","version":"5b1f8576c2505d00031254db","project":"571fa55ca0acd42000af9545","__v":0,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2017-01-01T17:04:07.774Z","from_sync":false,"order":13,"slug":"3d-controls","title":"Controllables"},"parentDoc":null,"user":"571fa519db52d01700f5cf3d","project":"571fa55ca0acd42000af9545","version":{"_id":"5b1f8576c2505d00031254db","project":"571fa55ca0acd42000af9545","__v":4,"forked_from":"594949e52be16d0026ec04cd","createdAt":"2017-06-20T16:14:29.816Z","releaseDate":"2017-06-20T16:14:29.816Z","categories":["5b1f8576c2505d0003125424","5b1f8576c2505d0003125425","5b1f8576c2505d0003125426","5b1f8576c2505d0003125427","5b1f8576c2505d0003125428","5b1f8576c2505d0003125429","5b1f8576c2505d000312542a","5b1f8576c2505d000312542b","5b1f8576c2505d000312542c","5b1f8576c2505d000312542d","5b1f8576c2505d000312542e","5b1f8576c2505d000312542f","5b1f8576c2505d0003125430","5b1f8576c2505d0003125431","5b1f8576c2505d0003125432","5b1f8576c2505d0003125433","5b1f8576c2505d0003125434","5b1f8576c2505d0003125435","5b1f8576c2505d0003125436","5b1f8576c2505d0003125437","5b1f8576c2505d0003125438","5b1f8aab9c683000032979e7","5b1f8b2f3073470003ffa5da","5b1f8bd9fd653400031d94f4","5b1f900bd4c5f000036b57bd"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"Mangalica","version_clean":"3.3.0","version":"3.3.0"},"githubsync":"","__v":0,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2017-01-01T17:06:36.302Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":6,"body":"> extends [VRTK_BaseControllable](doc:vrtk_basecontrollable)\n\n## Overview\n\nAn artificially simulated pushable pusher.\n\n**Required Components:**\n * `Collider` - A Unity Collider to determine when an interaction has occured. Can be a compound collider set in child GameObjects. Will be automatically added at runtime.\n\n**Script Usage:**\n * Place the `VRTK_ArtificialPusher` script onto the GameObject that is to become the pusher.\n\n## Inspector Parameters\n\n * **Pressed Distance:** The distance along the `Operate Axis` until the pusher reaches the pressed position.\n * **Min Max Limit Threshold:** The threshold in which the pusher's current normalized position along the `Operate Axis` has to be within the minimum and maximum limits of the pusher.\n * **Resting Position:** The normalized position of the pusher between the original position and the pressed position that will be considered as the resting position for the pusher.\n * **Resting Position Threshold:** The normalized value that the pusher can be from the `Resting Position` before the pusher is considered to be resting when not being interacted with.\n * **Press Speed:** The speed in which the pusher moves towards to the `Pressed Distance` position.\n * **Return Speed:** The speed in which the pusher will return to the `Target Position` of the pusher.\n\n## Class Methods\n\n### GetValue/0\n\n  > `public override float GetValue()`\n\n * Parameters\n   * _none_\n * Returns\n   * `float` - The actual position of the pusher.\n\nThe GetValue method returns the current position value of the pusher.\n\n### GetNormalizedValue/0\n\n  > `public override float GetNormalizedValue()`\n\n * Parameters\n   * _none_\n * Returns\n   * `float` - The normalized position of the pusher.\n\nThe GetNormalizedValue method returns the current position value of the pusher normalized between `0f` and `1f`.\n\n### SetValue/1\n\n  > `public override void SetValue(float value)`\n\n * Parameters\n   * `float value` - Not used.\n * Returns\n   * _none_\n\nThe SetValue method is not implemented as the pusher resets automatically.\n\n### IsResting/0\n\n  > `public override bool IsResting()`\n\n * Parameters\n   * _none_\n * Returns\n   * `bool` - Returns `true` if the pusher is currently at the resting position.\n\nThe IsResting method returns whether the pusher is currently at it's resting position.\n\n### SetStayPressed/1\n\n  > `public virtual void SetStayPressed(bool state)`\n\n * Parameters\n   * `bool state` - The state to set the `Stay Pressed` parameter to.\n * Returns\n   * _none_\n\nThe SetStayPressed method sets the `Stay Pressed` parameter to the given state and if the state is false and the pusher is currently pressed then it is reset to the original position.\n\n### SetPositionTarget/1\n\n  > `public virtual void SetPositionTarget(float normalizedTarget)`\n\n * Parameters\n   * `float normalizedTarget` - The `Position Target` to set the pusher to between `0f` and `1f`.\n * Returns\n   * _none_\n\nThe SetPositionTarget method sets the `Position Target` parameter to the given normalized value.","excerpt":"","slug":"vrtk_knob","type":"basic","title":"VRTK_ArtificialPusher"}

VRTK_ArtificialPusher


> extends [VRTK_BaseControllable](doc:vrtk_basecontrollable) ## Overview An artificially simulated pushable pusher. **Required Components:** * `Collider` - A Unity Collider to determine when an interaction has occured. Can be a compound collider set in child GameObjects. Will be automatically added at runtime. **Script Usage:** * Place the `VRTK_ArtificialPusher` script onto the GameObject that is to become the pusher. ## Inspector Parameters * **Pressed Distance:** The distance along the `Operate Axis` until the pusher reaches the pressed position. * **Min Max Limit Threshold:** The threshold in which the pusher's current normalized position along the `Operate Axis` has to be within the minimum and maximum limits of the pusher. * **Resting Position:** The normalized position of the pusher between the original position and the pressed position that will be considered as the resting position for the pusher. * **Resting Position Threshold:** The normalized value that the pusher can be from the `Resting Position` before the pusher is considered to be resting when not being interacted with. * **Press Speed:** The speed in which the pusher moves towards to the `Pressed Distance` position. * **Return Speed:** The speed in which the pusher will return to the `Target Position` of the pusher. ## Class Methods ### GetValue/0 > `public override float GetValue()` * Parameters * _none_ * Returns * `float` - The actual position of the pusher. The GetValue method returns the current position value of the pusher. ### GetNormalizedValue/0 > `public override float GetNormalizedValue()` * Parameters * _none_ * Returns * `float` - The normalized position of the pusher. The GetNormalizedValue method returns the current position value of the pusher normalized between `0f` and `1f`. ### SetValue/1 > `public override void SetValue(float value)` * Parameters * `float value` - Not used. * Returns * _none_ The SetValue method is not implemented as the pusher resets automatically. ### IsResting/0 > `public override bool IsResting()` * Parameters * _none_ * Returns * `bool` - Returns `true` if the pusher is currently at the resting position. The IsResting method returns whether the pusher is currently at it's resting position. ### SetStayPressed/1 > `public virtual void SetStayPressed(bool state)` * Parameters * `bool state` - The state to set the `Stay Pressed` parameter to. * Returns * _none_ The SetStayPressed method sets the `Stay Pressed` parameter to the given state and if the state is false and the pusher is currently pressed then it is reset to the original position. ### SetPositionTarget/1 > `public virtual void SetPositionTarget(float normalizedTarget)` * Parameters * `float normalizedTarget` - The `Position Target` to set the pusher to between `0f` and `1f`. * Returns * _none_ The SetPositionTarget method sets the `Position Target` parameter to the given normalized value.