{"_id":"5b1f8576c2505d000312544f","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"},"project":"571fa55ca0acd42000af9545","user":"571fa519db52d01700f5cf3d","parentDoc":null,"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:12.866Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"settings":"","results":{"codes":[]},"auth":"required","params":[],"url":""},"isReference":false,"order":3,"body":"> extends [VRTK_BasePhysicsControllable](doc:vrtk_basephysicscontrollable)\n\n## Overview\n\nA physics based 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 * `Rigidbody` - A Unity Rigidbody to allow the GameObject to be affected by the Unity Physics System. Will be automatically added at runtime.\n\n**Optional Components:**\n * `VRTK_ControllerRigidbodyActivator` - A Controller Rigidbody Activator to automatically enable the controller rigidbody upon touching the pusher.\n\n**Script Usage:**\n * Create a pusher container GameObject and set the GameObject that is to become the pusher as a child of the newly created container GameObject.\n * Place the `VRTK_PhysicsPusher` script onto the GameObject that is to become the pusher.\n\n  > The Physics Pusher script must not be on a root level GameObject. Any runtime world positioning of the pusher must be set on the parent container GameObject.\n\n## Inspector Parameters\n\n * **Pressed Distance:** The local space distance along the `Operate Axis` until the pusher reaches the pressed position.\n * **Stay Pressed:** If this is checked then the pusher will stay in the pressed position when it reaches the maximum 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 * **Position Target:** The normalized position of the pusher between the original position and the pressed position. `0f` will set the pusher position to the original position, `1f` will set the pusher position to the pressed position.\n * **Target Force:** The amount of force to apply to push the pusher towards the intended target position.\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### GetControlJoint/0\n\n  > `public virtual ConfigurableJoint GetControlJoint()`\n\n * Parameters\n   * _none_\n * Returns\n   * `ConfigurableJoint` - The joint associated with the control.\n\nThe GetControlJoint method returns the joint associated with the control.","excerpt":"","slug":"vrtk_chest","type":"basic","title":"VRTK_PhysicsPusher"}

VRTK_PhysicsPusher


> extends [VRTK_BasePhysicsControllable](doc:vrtk_basephysicscontrollable) ## Overview A physics based 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. * `Rigidbody` - A Unity Rigidbody to allow the GameObject to be affected by the Unity Physics System. Will be automatically added at runtime. **Optional Components:** * `VRTK_ControllerRigidbodyActivator` - A Controller Rigidbody Activator to automatically enable the controller rigidbody upon touching the pusher. **Script Usage:** * Create a pusher container GameObject and set the GameObject that is to become the pusher as a child of the newly created container GameObject. * Place the `VRTK_PhysicsPusher` script onto the GameObject that is to become the pusher. > The Physics Pusher script must not be on a root level GameObject. Any runtime world positioning of the pusher must be set on the parent container GameObject. ## Inspector Parameters * **Pressed Distance:** The local space distance along the `Operate Axis` until the pusher reaches the pressed position. * **Stay Pressed:** If this is checked then the pusher will stay in the pressed position when it reaches the maximum 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. * **Position Target:** The normalized position of the pusher between the original position and the pressed position. `0f` will set the pusher position to the original position, `1f` will set the pusher position to the pressed position. * **Target Force:** The amount of force to apply to push the pusher towards the intended target position. ## 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. ### GetControlJoint/0 > `public virtual ConfigurableJoint GetControlJoint()` * Parameters * _none_ * Returns * `ConfigurableJoint` - The joint associated with the control. The GetControlJoint method returns the joint associated with the control.