Esempio n. 1
0
        Quaternion WallOrientationToRotation(BuildingChainOrientation wallOrientation)
        {
            switch (wallOrientation)
            {
            case BuildingChainOrientation.NotAWallOrWallJoint:
            case BuildingChainOrientation.NorthToSouth:
                return(Quaternion.Euler(_eulerAnglesNorthToSouth));

            case BuildingChainOrientation.WestToEast:
                return(Quaternion.Euler(_eulerAnglesWestToEast));

            default:
                throw new System.NotImplementedException();
            }
        }
Esempio n. 2
0
        private void WallChainDetector_OnWallOrientationChanged(BuildingChainOrientation wallOrientation)
        {
            Quaternion rotation = WallOrientationToRotation(wallOrientation);

            _modelToRotate.rotation = rotation;
        }