From c41725c9c663930040726c6a7e3e74965cd7e529 Mon Sep 17 00:00:00 2001
From: Arman Elgudzhyan <48544263+puchik@users.noreply.github.com>
Date: Tue, 20 Feb 2024 09:28:09 -0800
Subject: [PATCH] Removed unnecessary AABB initialization for CPUParticles
Setting an AABB manually for CPUParticles unnecessarily registers as a custom AABB and can cause issues on some platforms and hardware.
---
doc/classes/CPUParticles3D.xml | 2 +-
scene/3d/cpu_particles_3d.cpp | 1 -
2 files changed, 1 insertion(+), 2 deletions(-)
diff --git a/doc/classes/CPUParticles3D.xml b/doc/classes/CPUParticles3D.xml
index a6f85e7fe52..79283d6f859 100644
--- a/doc/classes/CPUParticles3D.xml
+++ b/doc/classes/CPUParticles3D.xml
@@ -309,7 +309,7 @@
Minimum tangent acceleration.
-
+
The [AABB] that determines the node's region which needs to be visible on screen for the particle system to be active.
Grow the box if particles suddenly appear/disappear when the node enters/exits the screen. The [AABB] can be grown via code or with the [b]Particles → Generate AABB[/b] editor tool.
diff --git a/scene/3d/cpu_particles_3d.cpp b/scene/3d/cpu_particles_3d.cpp
index d47e63d7904..8725ff19c93 100644
--- a/scene/3d/cpu_particles_3d.cpp
+++ b/scene/3d/cpu_particles_3d.cpp
@@ -1684,7 +1684,6 @@ CPUParticles3D::CPUParticles3D() {
set_emitting(true);
set_amount(8);
- set_visibility_aabb(AABB(Vector3(-4, -4, -4), Vector3(8, 8, 8)));
set_param_min(PARAM_INITIAL_LINEAR_VELOCITY, 0);
set_param_min(PARAM_ANGULAR_VELOCITY, 0);