private void Awake() { _handSkeleton = GetComponent <HandSkeleton>(); _hand = GetComponent <Hand>(); _capsulesParent = new GameObject("HandPhysics").transform; _capsulesParent.SetParent(_hand.transform.parent, false); _capsules = new CapsuleInfo[(int)OVRPlugin.SkeletonConstants.MaxBoneCapsules]; }
private IEnumerator InitializeSkeleton() { bool success = false; while (!success) { var skeleton = new OVRPlugin.Skeleton(); if (OVRPlugin.GetSkeleton(HandSkeleton.GetSkeletonTypeFromHandType(_hand.HandType), out skeleton)) { success = InitializePhysics(ref skeleton); } yield return(null); } IsInitialized = true; }