im trying to implement shape shifting, i made some code that takes the mesh node of the raycast collision point and sets the players mesh to the enemy mesh but when it activates the player mesh turns just invisible
here are the parts of the code that does the shifting:
onready var rayCast = $RayCast
onready var mesh = $mesh
func _physics_process(delta):
if rayCast.is_colliding():
var target = rayCast.get_collider()
if target.is_in_group("enemdr"):
var msh = target.get_child(1)
mesh.mesh = msh
i tried printing msh and it did print the name of the mesh instance node used in the enemy so what is going on?