duplicate the mesh as well
This commit is contained in:
parent
607973c2ac
commit
4c56d6badc
@ -118,10 +118,12 @@ func hold_thing(p_item_instance_id: int) -> void:
|
||||
# TODO: in more complex scenarios model scene might want to have its own callback for this.
|
||||
for model in base_node.get_children():
|
||||
for submodel in model.get_children():
|
||||
var material := submodel.mesh.surface_get_material(0).duplicate() as Material
|
||||
var mesh := submodel.mesh.duplicate() as Mesh
|
||||
var material := mesh.surface_get_material(0).duplicate()
|
||||
material.render_priority += 1
|
||||
material.no_depth_test = true
|
||||
submodel.mesh.surface_set_material(0, material)
|
||||
mesh.surface_set_material(0, material)
|
||||
submodel.mesh = mesh
|
||||
|
||||
@rpc("any_peer", "call_local", "reliable")
|
||||
func throw_thing() -> void:
|
||||
|
Loading…
Reference in New Issue
Block a user