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.
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
- Select a new GameObject.
- Reset the Position, Rotation and Scale of the Object. Ensure Position is set to <0, 0, 0>
- Set Sync Values to Rotation
EasyDialcomponent to GameObject
- Add one or more colliders to the GameObject - This is used to detect the closest interactive object to the controller
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).
|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.|
|The object's unique index - this will be automatically set by the SDK and should not be edited.|
|Reference 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.
|Only after a second hand is engaged will the object move.|
|Only after a second hand is engaged will the object unsnap.|
|How to treat physics after the player let go of the object.|
|A 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.|
|The Axis that this dial will rotate around|
|Maximum angle speed to be applied. The lower this value the slower the dial moves.|
|Specifies a zone around the center of the dial where movement of controller is ignored.|
|Type 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.|
|Optional 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 limits from |
|The 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