Guides
Guides
These docs are for v2.2.1. Click to read the latest docs for v3.3.0.

VRTK_SpringLever

extends VRTK_Lever

Overview

This script extends VRTK_Lever to add spring force toward whichever end of the lever's range it is closest to.

The script will instantiate the required Rigidbody, Interactable and HingeJoint components automatically in case they do not exist yet. The joint is very tricky to setup automatically though and will only work in straight forward cases. If there are any issues, then create the HingeJoint component manually and configure it as needed.

Inspector Parameters

  • Spring Strength: Strength of the spring force that will be applied toward either end of the lever's range.