...
Table of Contents | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
Overview
Create a lever on an object activated by grabbing. Levers need to move from a pivot position properly so ensure this is set up properly (VR Grabbables & Unity Joints)
...
Lever Hinge
Gameobject contains the Hinge Joint and VR Grabbable logic.
Rigidbody
Field | Value |
---|---|
Use Gravity | false |
Is Kinematic | true |
Collision Detection | Continuous Speculative |
Hinge Joint
Field | Value |
---|---|
Axis + Secondary axis | Adjust identity matrix to pivot on desired axis. |
Connected Rigidbody | Rigidbody of main/body object |
Limit Rotation | true |
Lower Rotation | Desired negative degrees from rest position |
Upper Rotation | Desired positive degrees from rest position |
...
Required for Scene Objects, can be skipped if deploying as an asset.
Lever Object
The prefab of the lever itself with mesh renderers + colliders.
Collider
If possible use a primitive collider, unless you’re sure the user may only grab the object on the lever handle alone.
...