summaryrefslogtreecommitdiff
path: root/servers
diff options
context:
space:
mode:
authorHein-Pieter van Braam <hp@tmm.cx>2018-03-15 23:45:59 +0100
committerGitHub <noreply@github.com>2018-03-15 23:45:59 +0100
commit009b0bab4935655e240a7059a399fae445f2710a (patch)
tree2097ee6c855275e4755b6710cc0b4937f7d96486 /servers
parent99f286e23f5ed434cf8badb9b658262e68d47bcc (diff)
parentfc166f3ee1c48b1064e380219342cdd6e1cfb525 (diff)
Merge pull request #17248 from Cygon/implement-extra-culling-margin
Apply culling margin (fixes issue #16115)
Diffstat (limited to 'servers')
-rw-r--r--servers/visual/visual_server_scene.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/servers/visual/visual_server_scene.cpp b/servers/visual/visual_server_scene.cpp
index 884489375f..04dcde1365 100644
--- a/servers/visual/visual_server_scene.cpp
+++ b/servers/visual/visual_server_scene.cpp
@@ -730,6 +730,11 @@ void VisualServerScene::instance_set_exterior(RID p_instance, bool p_enabled) {
}
void VisualServerScene::instance_set_extra_visibility_margin(RID p_instance, real_t p_margin) {
+ Instance *instance = instance_owner.get(p_instance);
+ ERR_FAIL_COND(!instance);
+
+ instance->extra_margin = p_margin;
+ _instance_queue_update(instance, true, false);
}
Vector<ObjectID> VisualServerScene::instances_cull_aabb(const AABB &p_aabb, RID p_scenario) const {