Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | Dodgetgo | |
Old Version | Published before Godot 3 was released. |
I made a Shader for when you hit a 3d object it turn white and return smoothly to its old texture colors.
Here is the Shader Script in the Material Override.
uniform color col;
uniform texture source;
uniform float val;
DIFFUSE = tex(source, UV).rgb + (col.rgb * val);
and in the fixed Process of my objects is this
if(hit):
_hit();
get_node("Body").get_material_override().set_shader_param("val",hit_timer);
hit_timer is set to 1.
When hit by the Player all objects light up and it only reacts if i hit the last object on the list.
anyway around these issue?