Example #1
0
        protected void addSensor(MeshFilter sensorMesh)
        {
            sensorMesh.gameObject.layer = HighLogic.LoadedSceneIsEditor ? 21 : 2;
            sensorMesh.AddCollider(true);
            var sensor = sensorMesh.gameObject.AddComponent <Sensor>();

            sensor.Init(this);
            sensor.enabled = true;
            sensors.Add(sensor);
        }
Example #2
0
 public static SpatialSensor AddToMesh(MeshFilter meshFilter, Vessel vsl, float check_rate = 1, Callback <Part> callback = null)
 {
     meshFilter.AddCollider(true);
     return(AddToGO(meshFilter.gameObject, vsl, check_rate, callback));
 }