From 47f16af3f6d9734bda89bca3e0c8b6f2a3e45ad9 Mon Sep 17 00:00:00 2001 From: NguyenVanDat Date: Mon, 20 Apr 2026 09:45:40 +0700 Subject: [PATCH] check limit matter collider size --- Assets/PerfectWorld/Scripts/Objet/CECMatter.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Assets/PerfectWorld/Scripts/Objet/CECMatter.cs b/Assets/PerfectWorld/Scripts/Objet/CECMatter.cs index 41d8264ff2..b7b313e319 100644 --- a/Assets/PerfectWorld/Scripts/Objet/CECMatter.cs +++ b/Assets/PerfectWorld/Scripts/Objet/CECMatter.cs @@ -178,9 +178,9 @@ namespace PerfectWorld.Scripts //this is a workaround to fix the collider size issue when load prefab go wrong at some point //TODO: remove this workaround after the prefab load issue is fixed Vector3 size = matterObject.GetComponentInChildren().bounds.size; - if (size.x == 0) size.x = 0.5f; - if (size.y == 0) size.y = 0.5f; - if (size.z == 0) size.z = 0.5f; + if (size.x < 0.5f) size.x = 0.5f; + if (size.y < 0.5f) size.y = 0.5f; + if (size.z < 0.5f) size.z = 0.5f; collider.size = size; } // Create text object to display item name above the cube