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?

in Engine by (23 points)
edited by

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.

by (11,347 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.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.