//////////////////////////////////////////////////////////////////////////////////////////////// /*--------------------------------------------------------------------------------------------*/ public LeapInputSide(bool pIsLeft, LeapInputSettings pSettings) { IsLeft = pIsLeft; vSettings = pSettings; vMenu = new LeapInputMenu(IsLeft); vCursor = new LeapInputCursor(IsLeft); }
/*--------------------------------------------------------------------------------------------*/ public void Rebuild(Finger pLeapFinger) { if (pLeapFinger == null) { IsAvailable = false; Position = Vector3.zero; Rotation = Quaternion.identity; return; } Bone bone = pLeapFinger.Bone(Bone.BoneType.TYPE_DISTAL); IsAvailable = true; Position = pLeapFinger.TipPosition.ToUnityScaled(); Rotation = LeapInputMenu.CalcQuaternion(bone.Basis); }