summaryrefslogtreecommitdiff
path: root/scene/3d
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2019-06-14 18:31:47 +0200
committerGitHub <noreply@github.com>2019-06-14 18:31:47 +0200
commit0b555fc70af3c717665934c95070aa6aa481679f (patch)
tree1cdefbaf0e5043870add5ad92a938a4b2fb75dcb /scene/3d
parent0af387f04011d45db1174bc2d48012d4ff4c9dfa (diff)
parent30b3591152a9d421003bd2bfd63f3575953891a2 (diff)
Merge pull request #29782 from JFonS/expose_camera_clip_offset
Expose ClippedCamera clip_offset
Diffstat (limited to 'scene/3d')
-rw-r--r--scene/3d/camera.cpp7
-rw-r--r--scene/3d/camera.h2
2 files changed, 9 insertions, 0 deletions
diff --git a/scene/3d/camera.cpp b/scene/3d/camera.cpp
index a00f2173c0..c7d6919a2b 100644
--- a/scene/3d/camera.cpp
+++ b/scene/3d/camera.cpp
@@ -869,6 +869,11 @@ void ClippedCamera::clear_exceptions() {
exclude.clear();
}
+float ClippedCamera::get_clip_offset() const {
+
+ return clip_offset;
+}
+
void ClippedCamera::set_clip_to_areas(bool p_clip) {
clip_to_areas = p_clip;
@@ -912,6 +917,8 @@ void ClippedCamera::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_clip_to_areas", "enable"), &ClippedCamera::set_clip_to_areas);
ClassDB::bind_method(D_METHOD("is_clip_to_areas_enabled"), &ClippedCamera::is_clip_to_areas_enabled);
+ ClassDB::bind_method(D_METHOD("get_clip_offset"), &ClippedCamera::get_clip_offset);
+
ClassDB::bind_method(D_METHOD("set_clip_to_bodies", "enable"), &ClippedCamera::set_clip_to_bodies);
ClassDB::bind_method(D_METHOD("is_clip_to_bodies_enabled"), &ClippedCamera::is_clip_to_bodies_enabled);
diff --git a/scene/3d/camera.h b/scene/3d/camera.h
index 1cd729199d..c0a4f77435 100644
--- a/scene/3d/camera.h
+++ b/scene/3d/camera.h
@@ -234,6 +234,8 @@ public:
void remove_exception(const Object *p_object);
void clear_exceptions();
+ float get_clip_offset() const;
+
ClippedCamera();
~ClippedCamera();
};