Hi, any suggestion on how to change material parameters dynamically in HAXE script?
I was trying to change the color of one material gradually for some event. I didn’t find any example about this.
Modifying the Fact of a mix shader in your script.
hi Didier
Thanks! but how to access the mix shader and its Fact in the script?
By default the shader compiler bakes everything into the shader when possible for speed. We need something like this: https://github.com/armory3d/armory/issues/451. Looking into it!
@Milo
I use the TextureCoordinate node with an Empty object. When you move this Empty, for example its position x represents the value of Fact you need to control…
So if you attach this translation to an Event, then you are able to change the color of one material gradually for this Event.
Remember that you can use this too Not reliable SetMaterial node ... maybe the solution
You can share your experiences then with others here too Best switch colors method