From 18b434b73c78f32a9243eec831cc281c00b790f9 Mon Sep 17 00:00:00 2001 From: Youen Toupin Date: Mon, 28 Mar 2016 02:14:26 +0200 Subject: [PATCH] cleaned up test code --- Plugin/ModuleBalloonCase.cs | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) 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);