how to switch between different cameras in godot 4.0

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By heydan

I was making a game on godot 3.4, but after switching to 4.0, switching between cameras stopped working. doing according to the official documentation gives the Expected 0 arguments error.

code:

func _on_switch_1_body_entered(body):
$“…/room1”.current = true

:bust_in_silhouette: Reply From: zhyrin
get_viewport().get_camera_3d().current = false
$"./room1".current = true

Does this work? Btw, is $"./room1" a camera?