First, I'm a beginner in Godot and Game dev.
My Q: In Godot I'm using a Light2D following the player (acting as a kind of main light). The root of the scene "player" is a KinematicBody2d and the Light2D and Camera2d are child nodes. For the camera smoothing is enabled. As explained within the Godot documentation, I can use getcamerascreen_center() to get the real position of the camera. I thought something as simple as
light.position = $"Camera".get_camera_position()
would position the texture of the Light2D right. But now, the top/left corner of the light texture is somewhere in the bottom/right corner of the screen. What do I miss? How to calculate the offset to use? ( I tried half of the view port size but this is still incorrect.)
I would most like to have a signal emitted from the Light2D (with the real position) every time the real (smoothed) position is changing. But this seems not to be not implemented.