Esempio n. 1
0
        public static Result <int, string> RightControllerIndex(this CVRSystem hmd)
        {
            if (hmd == null)
            {
                throw new ArgumentNullException(nameof(hmd));
            }
            int?rightContIndex =
                hmd.DevicesInClass(ETrackedDeviceClass.Controller)
                .SingleOrDefault(i => hmd.GetControllerRoleForTrackedDeviceIndex((uint)i) == ETrackedControllerRole.RightHand);

            return(rightContIndex == null ? Result <int, string> .Err("No right controller") : rightContIndex.Value);
        }