0 votes

I have a 3d enemy scene with a material. In my world scene, I've instanced in a bunch of these enemies. I want them to flash red when they get hit. Currently, I have to duplicate() the material on each enemy in _ready() so that I can change its albedo_color separately from the other enemies. Is there a nicer solution to this problem without having to make individual copies of the material for each enemy?

asked Jul 7 in Engine by Henry Liu (23 points)
edited Jul 7 by Henry Liu

1 Answer

0 votes

Is there a nicer solution to this problem without having to make individual copies of the material for each enemy?

Not yet, but this will be supported in Godot 4.0 thanks to per-instance shader uniforms.

answered Jul 9 by Calinou (6,520 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.