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(); } }
private void WallChainDetector_OnWallOrientationChanged(BuildingChainOrientation wallOrientation) { Quaternion rotation = WallOrientationToRotation(wallOrientation); _modelToRotate.rotation = rotation; }