Assignment for RMIT Mixed Reality in 2020
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
487 B

  1. using Oculus.Avatar;
  2. public class OvrAvatarBase : OvrAvatarComponent
  3. {
  4. ovrAvatarBaseComponent component = new ovrAvatarBaseComponent();
  5. void Update()
  6. {
  7. if (owner == null)
  8. {
  9. return;
  10. }
  11. if (CAPI.ovrAvatarPose_GetBaseComponent(owner.sdkAvatar, ref component))
  12. {
  13. UpdateAvatar(component.renderComponent);
  14. }
  15. else
  16. {
  17. owner.Base = null;
  18. Destroy(this);
  19. }
  20. }
  21. }