Immerse

Easy Dial

A synchronised interactable dial that uses physics to rotate (but does not use a hinge)

Description

A dial that can be rotated and can snapped at multiple rotations, and is synchronised between multiple users in the same session.

This component does not use Unity's standard HingeJoint component to restrict movement, unlike Dial. These limits are based around Unity's physics system. Physics are also used to move the dial so we can achieve more realistic movement.

For an overview of how our SDK deals with interactions, please see Interaction Overview.

How it works

EasyDial uses physics (a Rigidbody and a Collider ) to enable interaction. When a VR user's hand comes in close proximity to the dial, they can pull the trigger on the controller to start interaction. The hand will disappear, but when they move the controller, the dial will rotate around the configured axes. Synchronisation is achieved via messages that are sent to all users in a session. The SDK takes care of this so no need to set any of this up.

If you require your object to snap onto particular rotations (like an "on" or "off" position), please see Snapping for an overview and how to set it up.

EasyDial also supports reactions, which allows logic operations to be integrated on various state changes, like start of interaction, or when snapped to snap targets. See Reactions and interaction logic for more information.

📘

Immerse SDK Class Library

More detail available in EasyDial

How to implement

  1. Select a new GameObject.
  • Reset the Position, Rotation and Scale of the Object. Ensure Position is set to <0, 0, 0>
  • Add Rigidbody component
  • Add TransformSync component
  • Set Sync Values to Rotation
  • Add EasyDial component to GameObject
  • Add one or more colliders to the GameObject - This is used to detect the closest interactive object to the controller

🚧

Common Issues

If the dial is not moving when you pull the trigger, check the following things:

  • Have you set the correct movement axis for the dial?
  • Do you have a collider on your GameObject? This is necessary for the SDK to detect engagement and for the Rigidbody to work.
    Note: When a collider is missing, you will not see the hand disappear when the trigger is pulled.
  • Do you have duplicate scene indices? You can check this on the Scene Object .
  • Do you have another collider near that might prevent movement/rotation?
  • Check if any requirements are set up, and are they all met (they should all be green when in play mode in the Editor Inspector).

Unity Editor Component

Options

PropertyDescription
Verbose Logging Enabled
When enabled, this component instance will log verbosely to the console (only in the Editor). This is useful for debugging, but can have a detrimental effect on the framerate as verbose logging sometimes logs every frame.
IndexThe object's unique index - this will be automatically set by the SDK and should not be edited.
TransformSyncReference to the TransformSymc that object is attached to.
If this is not set (default), then the SDK will look for the TransformSync on the same object.
Requires Two handsOnly after a second hand is engaged will the object move.
Requires Two hands for unsnappingOnly after a second hand is engaged will the object unsnap.
Is Kinematic After EngageHow to treat physics after the player let go of the object.
Interaction RequirementsA set of requirements that need to be met to allow interaction; can be used to disable the object until a particular state is reached. See Interaction Requirements for more details.
Movement AxisThe Axis that this dial will rotate around
Maximum Angle Speed Per SecondMaximum angle speed to be applied. The lower this value the slower the dial moves.
Dead Zone Radius in MetersSpecifies a zone around the center of the dial where movement of controller is ignored.
Movement TypeType of movement for this dial. This is used to determine the angle of rotation as the user moves the controller. Used to make the object rotate clockwise or anticlockwise, from the start position to the max.
HandleOptional handle transform used to indicate where the user should grab the object. If not set, the handle will be where the user grabs the object.
Use Rotation LimitsUse rotation limits from Max Angle
Max AngleThe maximum Angle that the dial will allow movement to, dial can move between 0 and the max; this can be more than 360 degrees.

Updated 4 months ago


Easy Dial


A synchronised interactable dial that uses physics to rotate (but does not use a hinge)

Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.