Загрузка...

Physics Based VR Dial with the XR Interaction Toolkit

This video is an exercise in creating a physics based dial in VR using the XR Interaction Toolkit and Joint components. We discuss how to store a rotation value, how to set limits on the dial, how to edit the starting value and position, and how to how to convert the degree rotation into a new range of values.

XRTerra Links:
Programs and Courses: http://www.xrterra.com/programs
Newsletter Signup: https://www.xrterra.com/mailing-list-signup/

Your First VR Scene with the XR Interaction Toolkit in Unity: https://youtu.be/nlRzw2lCIkk
Physics Joints in Unity: https://youtu.be/6G9MoLYQfeA

00:00 Intro and prerequisites
00:38 Setting up VR scene
01:16 Creating Dial Visuals
02:32 Cube can be replaced with model later
03:05 Dial Hinge Joint
03:34 Edit Angular Limits
04:07 Adding a handle
05:00 Handle components
05:21 XR Grab Interactable Dial
05:37 Velocity Tracking Movement Type
06:15 Fixed Joint on Handle
06:36 Using the XR Device Simulator
07:11 First testing of dial
07:27 Disabling Force Grab on Ray Interactors
08:11 Testing out Dial without force grab
08:52 Adding damper force to hinge
10:02 Using our hinge joint angle
10:27 Creating VR Dial script
11:02 Referencing the hinge
11:21 Outputting hinge angle into the Console
11:47 Hinge starting angle is 0
12:11 Hinge angle range is between -180 to 180
12:29 Clockwise vs counterclockwise
13:17 We need to store our own rotation value
13:41 Creating a float to store rotation
14:06 Comparing difference from last frames angle
15:21 Testing out angle storage
15:59 Catching the transition from -180 to 180
18:24 Testing out continuous rotation
19:12 Editing the starting position
20:09 Setting limits
21:37 Declaring a minimum and maximum rotation
22:13 Checking if we're close to the limit
23:02 Hinge Joint Limits type
24:04 Setting minimum and maximum limit
25:27 Setting useLimits to true
25:38 Duplicating if statement for minimum limit
26:59 Disabling limits when within range
27:45 Testing dial limits
28:03 Separate the physics objects from the visualization
29:07 Accounting for getting slightly out of range
30:29 Testing dial limit edge case
30:54 Starting value other than zero
32:16 Converting from degrees to another range
34:52 Testing converted Dial Output Value
35:26 Dials are great for precision
36:26 Outro

Instructor: Gregory Osborne

Видео Physics Based VR Dial with the XR Interaction Toolkit канала XR Terra Class
Яндекс.Метрика

На информационно-развлекательном портале SALDA.WS применяются cookie-файлы. Нажимая кнопку Принять, вы подтверждаете свое согласие на их использование.

Об использовании CookiesПринять