summaryrefslogtreecommitdiff
path: root/scene/3d/visual_instance.cpp
diff options
context:
space:
mode:
authorMarc Gilleron <marc.gilleron@gmail.com>2019-01-31 17:54:00 +0100
committerMarc Gilleron <marc.gilleron@gmail.com>2019-02-01 12:01:19 +0100
commit5b378f408c5a0e8e0c2b4c1cbff67959fd097ce9 (patch)
tree950f4c601d50c65f16614dbcecf0e239915734d4 /scene/3d/visual_instance.cpp
parentc21ca98e4c6e6228adefcc696b3ff6a1104c678e (diff)
Exposed custom AABB setter on GeometryInstance
Diffstat (limited to 'scene/3d/visual_instance.cpp')
-rw-r--r--scene/3d/visual_instance.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/scene/3d/visual_instance.cpp b/scene/3d/visual_instance.cpp
index 1bbf1b7bc7..0af6df72b6 100644
--- a/scene/3d/visual_instance.cpp
+++ b/scene/3d/visual_instance.cpp
@@ -263,6 +263,11 @@ float GeometryInstance::get_extra_cull_margin() const {
return extra_cull_margin;
}
+void GeometryInstance::set_custom_aabb(AABB aabb) {
+
+ VS::get_singleton()->instance_set_custom_aabb(get_instance(), aabb);
+}
+
void GeometryInstance::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_material_override", "material"), &GeometryInstance::set_material_override);
@@ -289,6 +294,8 @@ void GeometryInstance::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_extra_cull_margin", "margin"), &GeometryInstance::set_extra_cull_margin);
ClassDB::bind_method(D_METHOD("get_extra_cull_margin"), &GeometryInstance::get_extra_cull_margin);
+ ClassDB::bind_method(D_METHOD("set_custom_aabb", "aabb"), &GeometryInstance::set_custom_aabb);
+
ClassDB::bind_method(D_METHOD("get_aabb"), &GeometryInstance::get_aabb);
ADD_GROUP("Geometry", "");