Fix collider stretch bug

This commit is contained in:
TerrificTrifid 2023-04-21 16:52:33 -05:00
parent df6c31d45e
commit 09fbd3124a

View File

@ -156,7 +156,7 @@ namespace NewHorizons.Builder.Body
} }
var cubeSphereSC = cubeSphere.AddComponent<SphereCollider>(); var cubeSphereSC = cubeSphere.AddComponent<SphereCollider>();
cubeSphereSC.radius = Mathf.Min(module.minHeight, module.maxHeight); cubeSphereSC.radius = Mathf.Min(module.minHeight, module.maxHeight) * Mathf.Min(stretch.x, stretch.y, stretch.z);
var superGroup = planetGO.GetComponent<ProxyShadowCasterSuperGroup>(); var superGroup = planetGO.GetComponent<ProxyShadowCasterSuperGroup>();
if (superGroup != null) cubeSphere.AddComponent<ProxyShadowCaster>()._superGroup = superGroup; if (superGroup != null) cubeSphere.AddComponent<ProxyShadowCaster>()._superGroup = superGroup;