|Topic was automatically imported from the old Question2Answer platform.
I’m currently trying to make a little notes system that I can link to each node to keep notes on everything organized and with relevant references to the nodes themselves. Trying to get started on that, I came across a problem: no matter what I try, I don’t seem to be able to change the camera from the one that is following the player to the one moving around my notes. I’m even printing the camera.current variable before and after to check that it goes from false to true, and it does, but no change in camera. It works just fine if I do the exact same thing(setting current to true) in the editor but in code, no cigar. What could I be doing wrong here?
onready var notes_cam = get_node("NoteSystem/Viewport/Camera2D")
onready var player_cam = get_node("Game/PlayerCharacter/PlayerCamera")
if event is InputEventKey:
player_cam.current = false
notes_cam.current = true