From d76411e66c6a4ea52c2fc3d3ad61630eb57317e5 Mon Sep 17 00:00:00 2001 From: ackwell Date: Tue, 23 Jan 2024 00:40:29 +1100 Subject: [PATCH] Fix bounding box calculations for models offset from the origin --- Penumbra/Import/Models/Import/BoundingBox.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Penumbra/Import/Models/Import/BoundingBox.cs b/Penumbra/Import/Models/Import/BoundingBox.cs index 34aac827..be47ebb8 100644 --- a/Penumbra/Import/Models/Import/BoundingBox.cs +++ b/Penumbra/Import/Models/Import/BoundingBox.cs @@ -5,8 +5,8 @@ namespace Penumbra.Import.Models.Import; /// Mutable representation of the bounding box surrouding a collection of vertices. public class BoundingBox { - private Vector3 _minimum = Vector3.Zero; - private Vector3 _maximum = Vector3.Zero; + private Vector3 _minimum = new Vector3(float.PositiveInfinity, float.PositiveInfinity, float.PositiveInfinity); + private Vector3 _maximum = new Vector3(float.NegativeInfinity, float.NegativeInfinity, float.NegativeInfinity); /// Use the specified position to update this bounding box, expanding it if necessary. public void Merge(Vector3 position)