am using GDScript and i have other object with function called Change_Location, and am trying to call this function from other script
the code:
$CameraBody/Camera/BuyHouses/StaticBody.Change_Location(mx, my)
the object CameraBody is not recognized but its exists in the world node
can someone help me?
the whole function:
func on_input_event(camera, event, click_position, click_normal, shape_idx):
var mouse_click = event as InputEventMouseButton
if mouse_click and mouse_click.button_index == 1 and mouse_click.pressed:
print("clicked")
var mouse_pos = get_viewport().get_mouse_position()
var mx = mouse_pos.x
var my = mouse_pos.y
$CameraBody/Camera/BuyHouses/StaticBody.Change_Location(mx, my)