void Update() { Aero air = FindObjectOfType <Aero>(); if (air != null) { if (WindX.gameObject.active == false) { WindX.gameObject.active = WindY.gameObject.active = WindZ.gameObject.active = true; } air.WindVelocity.x = WindX.value; air.WindVelocity.y = WindY.value; air.WindVelocity.z = WindZ.value; } CreateCloth sp = FindObjectOfType <CreateCloth>(); if (sp != null) { sp.b = DampingForce.value; sp.k = SpringConst.value; } else { WindX.gameObject.active = WindY.gameObject.active = WindZ.gameObject.active = false; } }
void Awake() { cc = FindObjectOfType<CreateCloth>(); c = gameObject.GetComponent<Camera>(); if (c.orthographic) { c.orthographicSize = cc.amount * cc.distanceAppart; } go = new GameObject("Mouse Location"); /// Creates empty gameobject to be used as cursor in World space }
void Awake() { cc = FindObjectOfType <CreateCloth>(); c = gameObject.GetComponent <Camera>(); if (c.orthographic) { c.orthographicSize = cc.amount * cc.distanceAppart; } go = new GameObject("Mouse Location"); /// Creates empty gameobject to be used as cursor in World space }