Browse Source

Fix ReflectionProbe AABB

landervr 9 months ago
parent
commit
11225de197

+ 0 - 7
editor/plugins/gizmos/reflection_probe_gizmo_plugin.cpp

@@ -165,13 +165,6 @@ void ReflectionProbeGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
 		aabb.position = -size / 2;
 		aabb.size = size;
 
-		for (int i = 0; i < 12; i++) {
-			Vector3 a, b;
-			aabb.get_edge(i, a, b);
-			lines.push_back(a);
-			lines.push_back(b);
-		}
-
 		for (int i = 0; i < 8; i++) {
 			Vector3 ep = aabb.get_endpoint(i);
 			internal_lines.push_back(probe->get_origin_offset());

+ 2 - 2
scene/3d/reflection_probe.cpp

@@ -185,8 +185,8 @@ ReflectionProbe::UpdateMode ReflectionProbe::get_update_mode() const {
 
 AABB ReflectionProbe::get_aabb() const {
 	AABB aabb;
-	aabb.position = -origin_offset;
-	aabb.size = origin_offset + size / 2;
+	aabb.position = -size / 2;
+	aabb.size = size;
 	return aabb;
 }