Fix GeometryInstance3D Custom AABB assignment in the editor not working

This also fixes error spam when changing Custom AABB on a MeshInstance3D
that has no Mesh resource assigned yet (which is allowed in the editor).
This avoids pitfalls when assigning a custom AABB in a script when
loading meshes at runtime.
This commit is contained in:
Hugo Locurcio 2024-04-09 18:59:46 +02:00
parent a7b860250f
commit 084b8d1246
No known key found for this signature in database
GPG Key ID: 39E8F8BE30B0A49C
1 changed files with 0 additions and 1 deletions

View File

@ -1029,7 +1029,6 @@ inline bool is_geometry_instance(RenderingServer::InstanceType p_type) {
void RendererSceneCull::instance_set_custom_aabb(RID p_instance, AABB p_aabb) {
Instance *instance = instance_owner.get_or_null(p_instance);
ERR_FAIL_NULL(instance);
ERR_FAIL_COND(!is_geometry_instance(instance->base_type));
if (p_aabb != AABB()) {
// Set custom AABB