public void SetHandPhysics(HandModel hand, bool enabled) { PuppetView view = BasicHelpers.FindFirst <HPTKView, PuppetView>(hand.view.registry); if (view) { view.SetPhysics(enabled); } }
void Init(AvatarView avatar) { if (detector != null) { return; } if (side == Side.Left) { detector = BasicHelpers.FindFirst <HPTKView, GestureDetectionView>(avatar.body.leftHand.registry); } else { side = Side.Right; detector = BasicHelpers.FindFirst <HPTKView, GestureDetectionView>(avatar.body.rightHand.registry); } if (detector == null) { Debug.LogWarning(side.ToString() + " hand of avatar " + avatar.name + " does not have a GestureDetectionController registered. Searching in the next avatar"); avatarToSearch++; FindAvatar(); return; } thumb.finger = detector.thumb; index.finger = detector.index; middle.finger = detector.middle; ring.finger = detector.ring; pinky.finger = detector.pinky; if (detector.extra.Count > 0) { extra = detector.extra[0]; } thumb.SearchExtraGesture(); index.SearchExtraGesture(); middle.SearchExtraGesture(); ring.SearchExtraGesture(); pinky.SearchExtraGesture(); }
public Tout GetRegisteredView <Tout>() where Tout : HPTKView { return(BasicHelpers.FindFirst <HPTKView, Tout>(registry)); }