Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Panel
panelIconId1f393
panelIcon:mortar_board:
panelIconText🎓
bgColor#4C9AFF

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
minLevel1
maxLevel6
outlinefalse
typelist
printablefalse

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.

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

...

Field

...

Value

...

State

...

Whatever name you want to use as a variable when authoring

Joint Boolean State Setter

Binds the hinge joint with the boolean state setterBinds 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.

...

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