Thanks a lot to everyone! I’ll try it 😄
xolatgames
- 2 Posts
- 2 Comments
Joined 3 days ago
Cake day: April 22nd, 2025
You are not logged in. If you use a Fediverse account that is able to follow users, you can follow this user.
Thanks a lot to everyone! I’ll try it 😄
Thanks a lots, folks! 😄 Everything works fine now 👍🏼
What I have to do:
var new_model = model.front.duplicate(true) var new_ship: Node3D = new_model.instantiate() new_ship.position = front_model_pos _model_parent.add_child(new_ship) _make_ship_materials_unique(new_ship)
mesh.surface_set_material
tomesh.set_surface_override_material
:func _make_ship_materials_unique(new_ship: Node3D) -> void: for i in new_ship.get_children(true): if i is MeshInstance3D: for n in range(i.get_surface_override_material_count()): i.set_surface_override_material(n, i.mesh.surface_get_material(n).duplicate(true))
func damaged_spec_effect() -> void: for i in ship.get_children(true): if i is MeshInstance3D: for n in range(i.get_surface_override_material_count()): _create_fade_in_then_out_effect(i.get_surface_override_material(n), Color.RED)
And everything started works as well. Thanks again 🤝🏼