Skip to main content

VR

info

You can import this example in the Package Manager window
Managing Samples

danger

To use this sample you must first add OpenXR plugin to your project
OpenXR Plugin Site

danger

This sample only supports avatars specifically made for VR, not the ones generated by users. This is a WIP

In this example we will use the SDK UI to create and load avatars.

First, open the VR Sample scene. You can find it in:
VR w/ User Interface Scenes

Requirements

Add two new layers: "Avatar” and "VRHead"

To do this go to the Inspector -> Layer -> Add Layer

0_add_new_layer

Then add the name “Avatar” to an empty field. Do the same for "VRHead"

00_add_new_layer


The VR Avatar Loader

20_vr_loader

VariableDescription
PlayerAnimatorThe animator controller for the avatar. (Don't change this if you want hand animations)
Use VR HandsIf false, it will hide avatar's hand by default. Use this if you want to use custom hand models
Use Hands CanimationsRequires "Use VR Hands". If true, the hands will match the controller hand gestures
Head TransformTransform of the HMD to contraint the avatar's head
Right Hand TransformTransform of the right controller to contraint the avatar's hand
Left Hand TransformTransform of the left controller to contraint the avatar's hand
OffsetsUse this to tweak the final position/rotation offsets of the constraints

Untitled

Untitled