summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/classes/Camera.xml7
-rw-r--r--scene/3d/camera.cpp1
2 files changed, 8 insertions, 0 deletions
diff --git a/doc/classes/Camera.xml b/doc/classes/Camera.xml
index 05858e8bc6..0b7021b4a1 100644
--- a/doc/classes/Camera.xml
+++ b/doc/classes/Camera.xml
@@ -39,6 +39,13 @@
<description>
</description>
</method>
+ <method name="get_camera_rid" qualifiers="const">
+ <return type="RID">
+ </return>
+ <description>
+ Returns the camera's RID from the [VisualServer].
+ </description>
+ </method>
<method name="is_position_behind" qualifiers="const">
<return type="bool">
</return>
diff --git a/scene/3d/camera.cpp b/scene/3d/camera.cpp
index 8b91f56344..e360de5b8e 100644
--- a/scene/3d/camera.cpp
+++ b/scene/3d/camera.cpp
@@ -524,6 +524,7 @@ void Camera::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_doppler_tracking", "mode"), &Camera::set_doppler_tracking);
ClassDB::bind_method(D_METHOD("get_doppler_tracking"), &Camera::get_doppler_tracking);
ClassDB::bind_method(D_METHOD("get_frustum"), &Camera::get_frustum);
+ ClassDB::bind_method(D_METHOD("get_camera_rid"), &Camera::get_camera);
ClassDB::bind_method(D_METHOD("set_cull_mask_bit", "layer", "enable"), &Camera::set_cull_mask_bit);
ClassDB::bind_method(D_METHOD("get_cull_mask_bit", "layer"), &Camera::get_cull_mask_bit);