Which Camera are you calling get_camera_position
on? Also, if you have a reference to the camera, you can just get the position of the camera using $CameraNodeHere.position
, which will return the position of the camera relative to its parent node. If you want the position of the camera relative to the scene origin, then you can use $CameraNodeHere.global_position
, which will return the global position of the camera.
I'm guessing get_camera_position
returns the local position, rather than the global position, which is why you are getting a value of (0, 0)
. I'd suggest trying $CameraNodeHere.global_position
and see if that fixes the issue.