A VR Dial is a static mesh with a bunch of functionality built in that you can quickly tweak to fit your needs. With a VR Dial you can easily make interactable knobs that turn things on/off, or other things like egg timers, padlocks, cranks, and faucet handles. You can even make giant, ugly programmer art radios like this!
General Blueprint Workflow:
- Add a VRDial component to your desired blueprint or create a new component from the VRDial component to use the same logic in multiple blueprints.
- Set the static mesh
- Adjust the details of the component.
- Use the events, functions, and variables to create your desired logic.
|Clockwise Maximum Dial Angle||How far the dial can be rotated clockwise.
Note: negative values decrease the amount the dial can rotate counter clockwise.
|CClockwise Maximum Dial Angle||How far the dial can be rotated counter-clockwise.
Note: negative values decrease the amount the dial can rotate clockwise.
|Use Rollover||If True, counter clockwise rotation results in negative angle values. Allows rotation beyond 0-360 degrees.
Note: still respects the limits set by clockwise and cclockwise max dial angles.
|Dial Uses Angle Snap||If True, forces the dial to “snap” into angles set via the Snap Angle Increments and Snap Angle Threshold – OR – Dial Snap Angle List (if it is set to True as well) settings. Also enables the event “On Dial Hit Angle” to fire.
Note: if not using rollover or the snap angle list, the angles 360 and 0 will both fire Hit Snap Angle Events.
|Dial Use Snap Angle List||Enables use of the Dial Snap Angle List, a custom array of angles the dial will only be allowed to snap to.
Note: disables Snap Angle Increment and Snap Angle Threshold settings.
|Dial Snap Angle List||A list of angles the dial is allowed to snap to. Will NOT allow the dial to be put into any angle other than those listed. Works with rollover, but will only show movement when snapping into an angle. This means that the dial will track your rotations but will not provide any visual feedback that it is doing so without angles to snap to in between.
Note: if you add any negative values to the list, you must enable use rollover in order for them to be accessible
|Snap Angle Increment||How far the dial needs to rotate before entering a Snap Angle. Once at a Snap Angle, the event Hit Snap Angle fires.
Note: this setting is only active when Dial Uses Angle Snap is enabled AND Dial Use Angle List is disabled.
|Snap Angle Threshold||How far away the current angle can be before being “snapped” into a Snap Angle Increment. Smaller numbers than the increment value will allow smooth movement and make the snap angle less visible to the player. Larger numbers will give the feeling of a detent or “hitch” when reaching a snap angle. If the Threshold is equal to or greater than the Incement, the dial will only visually move when the controller has been rotated far enough to reach the next Increment.|
|Rotation Scaler||How slow or fast the dial turns in response to player input. This allows you to make a the dial feel heavier (set to < 1.0) or lighter (set to > 1.0). With the same amount of rotation from the player’s VR controller:
1.0 is the default dial moves along with the controller.
Lower than 1.0 will decrease the amount the dial rotates (at 0.5 the dial will move at half the rate of the controller).
Higher than 1.0 will increase the amount the dial rotates (2.0 means that the dial will move 2 times more than the controller does).
|Dial Rotation Axis||On which axis (X, Y, or Z) the dial rotates (from the VRDial’s static mesh pivot point).|
|Dial Use Direct Hand Rotation||When enabled, the dial turns with the controller (or other interactor) directly. Enables selection of Interactor Rotation Axis.|
|Interactor Rotation Axis||X, Y, or Z axis selection to determine which axis of the interactor (usually a player’s motion controller) the dial will follow.|
|Lerp Back on Release||If enabled, the dial will rotate back to its original position (angle 0) when interaction ends.|
|Send Dail Events During Lerp||If enabled, the dial will fire VRDial events while returning to its original (angle 0) position.|
|Dial Return Speed||If Lerp Back On Release is True, this controls how quickly the dial should rotate back to its original position (angle 0) when not being interacted with.|
|On Dial Hit Angle||Fires when Dial Uses Angle Snap is True.|
|On Finished Lerping||Fires when Lerp Back on Release is True and the Dial’s Current Angle = 0.|
|Add Dial Angle||Affects the Dial’s Current Angle based on the float input. Note: Respects max angle settings.|
|Set Dial Angle||Instantly set the Dial’s Current Angle to the desired float. Note: Respects max angle settings.|
|Reset Initial Location||Take the current state of the Dial and make that the new initial location. Sets Current Angle to 0.|