diff --git a/Plugin/ModuleBalloonCase.cs b/Plugin/ModuleBalloonCase.cs index 0b4e916..1e1b1ee 100644 --- a/Plugin/ModuleBalloonCase.cs +++ b/Plugin/ModuleBalloonCase.cs @@ -98,23 +98,11 @@ namespace Aerostats UnityEngine.Debug.Log("Aerostats: staged"); Util.PostDebugScreenMessage("staged"); - /*var balloonObject = GameObject.CreatePrimitive(PrimitiveType.Sphere); - balloonObject.SetActive(false); - balloonObject.transform.position = part.Rigidbody.position + part.Rigidbody.transform.up; - var balloonPart = balloonObject.AddComponent(); - balloonPart.children = new List(); - balloonPart.partTransform = balloonObject.transform; - balloonPart.name = "heliumBalloon"; - new GameObject("model").transform.parent = balloonPart.partTransform; - balloonPart.SetHierarchyRoot(balloonPart); - balloonPart.vessel = vessel; - balloonPart.setParent(part);*/ - AvailablePart avPart = PartLoader.Instance.parts.Single(p => p.name == "heliumBalloon"); var balloonPart = (Part)UnityEngine.Object.Instantiate(avPart.partPrefab); var balloonObject = balloonPart.gameObject; balloonObject.transform.position = part.Rigidbody.position + part.Rigidbody.transform.up * 3.0f; - //balloonObject.transform.rotation = part.Rigidbody.rotation; + balloonObject.transform.rotation = part.Rigidbody.rotation; balloonPart.SetHierarchyRoot(balloonPart); balloonPart.vessel = vessel; balloonPart.setParent(part);