Ejemplo n.º 1
0
        public MyCalibrator(GameObject head, Quaternion chestRef, Quaternion lArmRef, Quaternion rArmRef)
        {
            this.head = head;
            var enabledImus = new List <Imu>()
            {
                Imu.Chest, Imu.Left_Upper_Arm, Imu.Right_Upper_Arm
            };

            _imuMap = new Dictionary <Imu, ProcessedImu>();

            foreach (var imu in enabledImus)
            {
                _imuMap[imu] = new ProcessedImu(Quaternion.identity, imu.ToString());
            }
            _imuMap[Imu.Chest].originalGameOrientation           = chestRef.Clone();
            _imuMap[Imu.Left_Upper_Arm].originalGameOrientation  = lArmRef.Clone();
            _imuMap[Imu.Right_Upper_Arm].originalGameOrientation = rArmRef.Clone();
        }