public void TriggerReflect(gameLight input, Vector3 originA, Vector3 originB, Vector3 inNomral) { Debug.Log("Trigger Mirror!"); outcomeLight.lightOriginRight = originA - outcomeLight.lightProbe.transform.position; outcomeLight.lightOriginLeft = originB - outcomeLight.lightProbe.transform.position; Vector3 newDir = Vector3.Reflect(input.lightDirection, inNomral); outcomeLight.ChangeLightDirection(newDir); outcomeLight.SetEnable(true); outcomeLight.useWidth = false; }
// Use this for initialization void Start () { outcomeLight = GetComponent<gameLight>(); outcomeLight.SetEnable(false); }