Portals - fix showing debug collision shapes

Set the portal_mode to GLOBAL on creation.
This commit is contained in:
lawnjelly 2021-08-05 13:28:11 +01:00
parent 856097d7bc
commit 258831c12e

View file

@ -256,6 +256,7 @@ void CollisionObject::_update_debug_shapes() {
Ref<Mesh> mesh = s.shape->get_debug_mesh(); Ref<Mesh> mesh = s.shape->get_debug_mesh();
VS::get_singleton()->instance_set_base(s.debug_shape, mesh->get_rid()); VS::get_singleton()->instance_set_base(s.debug_shape, mesh->get_rid());
VS::get_singleton()->instance_set_transform(s.debug_shape, get_global_transform() * shapedata.xform); VS::get_singleton()->instance_set_transform(s.debug_shape, get_global_transform() * shapedata.xform);
VS::get_singleton()->instance_set_portal_mode(s.debug_shape, VisualServer::INSTANCE_PORTAL_MODE_GLOBAL);
} }
} }
} }