Panel | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
In depth learning on Scene Configuration can be found in this course in Motive Academy. |
Excerpt |
---|
Use a grabbable and a hinge Joint to create a lever with limited motion. |
Table of Contents | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
Overview
Create a lever on an object activated by grabbing. Lever’s Levers need to move from a pivot position properly so ensure this is set up properly (VR Grabbables & Unity Joints)
...
Gameobject contains the Hinge Joint and VR Grabbable logic.
Collider
If possible use a primative collider, unless you’re sure the user may only grab the object on the lever handle alone.
...
Field
...
Value
...
Trigger
...
Generally true unless this item needs physics
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 |
negative/positive degrees = direction of rotation
VR Grabbable
Field | Value |
---|---|
Allow Distance Grab | false |
Snap Position | Never |
Snap Orientation | Never |
Grab points | Collider(s) the user will be grabbing |
Release Behaviour | Leave and Reset Rigidbody |
Move Mode | Physics |
Joint Effects
Used to fire SFX/Haptics on upper/lower limit events
Field | Value |
---|---|
Lower Limit Reached - Haptic Effect | Bump (VRHapticEffect) |
Upper Limit Reached - Haptic Effect | Bump (VRHapticEffect) |
Usable World Object
Required to connect to the “use object” input for object interactions.
Field | Value |
---|---|
On Use | Connect to any animations, SFX, etc. required for the action. |
Joint Boolean State Setter
Binds the hinge Joint to a Boolean Behaviour State. In this case, sets the state to “true” when the lever is at the lower limit.
Field | Value |
---|---|
State | Whatever name you want to use as a variable when authoring |
Lower Limit State Setting | true |
Upper Limit State Setting | false |
Motive Scene Object
Required for Scene Objects, can be skipped if deploying as an asset.
User Click Action
Connects to “Usable World Action” to relay the “click” action.
User Touch Action
Connects to “Usable World Action” to relay the “touch” action.
Pointer Events
...
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.
Field | Value |
---|---|
Trigger | Generally true unless this item needs physics |
Related Articles