- Home /
Material Shininess change trough script?
Hi, I just wonder if you can use a script to randomly change the shininess of an Bumped Specular Material, I´m making a fireplace and I want it to look really good! I found this for the light effect that I gave it but I don't know if it can be used for the material: @script RequireComponent(Light)
var minIntensity = 0.25f;
var maxIntensity = 0.5f;
private var random : float;
random = Random.Range(0.0f, 65535.0f);
function Update()
{
var noise = Mathf.PerlinNoise(random, Time.time);
light.intensity = Mathf.Lerp(minIntensity, maxIntensity, noise);
}
Tnx!
//Elis
Comment