BlueGit

blue-star ggj-2020

Files

ggj-2020 / Assets / Oculus / Avatar / Scripts / OvrAvatarBase.cs

OvrAvatarBase.cs

Project Import
timfa Tim Falken · pushed by timfa · 6 years ago
b77834a1 History
OvrAvatarBase.cs 487 B Download Raw
1using Oculus.Avatar;
2
3public class OvrAvatarBase : OvrAvatarComponent
4{
5 ovrAvatarBaseComponent component = new ovrAvatarBaseComponent();
6
7 void Update()
8 {
9 if (owner == null)
10 {
11 return;
12 }
13
14 if (CAPI.ovrAvatarPose_GetBaseComponent(owner.sdkAvatar, ref component))
15 {
16 UpdateAvatar(component.renderComponent);
17 }
18 else
19 {
20 owner.Base = null;
21 Destroy(this);
22 }
23 }
24}