/// <summary> /// Apply adjustments to breast dynamic bones /// </summary> private void UpdateBreastDB(DynamicBone_Ver02 dynamicBone) { if (!BreastDBComments.Contains(dynamicBone.Comment)) { return; } //Expand the collision radius for the breast dynamic bones foreach (var pat in dynamicBone.Patterns) { #if KK pat.Params[0].CollisionRadius = BreastCollidersEnabled ? 0.08f * BreastCollisionRadiusMultiplier : 0; pat.Params[1].CollisionRadius = BreastCollidersEnabled ? 0.06f * BreastCollisionRadiusMultiplier : 0; #elif AI pat.Params[2].CollisionRadius = BreastCollidersEnabled ? 0.8f * BreastCollisionRadiusMultiplier : 0; pat.Params[3].CollisionRadius = BreastCollidersEnabled ? 0.6f * BreastCollisionRadiusMultiplier : 0; #else throw new System.NotImplementedException(); #endif } dynamicBone.GetType().GetMethod("InitNodeParticle", AccessTools.all).Invoke(dynamicBone, null); dynamicBone.GetType().GetMethod("SetupParticles", AccessTools.all).Invoke(dynamicBone, null); dynamicBone.InitLocalPosition(); if ((bool)dynamicBone.GetType().GetMethod("IsRefTransform", AccessTools.all).Invoke(dynamicBone, null)) { dynamicBone.setPtn(0, true); } dynamicBone.GetType().GetMethod("InitTransforms", AccessTools.all).Invoke(dynamicBone, null); }
/// <summary> /// Apply adjustments to breast dynamic bones /// </summary> private void UpdateBreastDB(DynamicBone_Ver02 dynamicBone) { if (!BreastDBComments.Contains(dynamicBone.Comment)) { return; } //Expand the collision radius for the breast dynamic bones for (var index = 0; index < dynamicBone.Patterns.Count; index++) { var pat = dynamicBone.Patterns[index]; #if KK || KKS pat.Params[0].CollisionRadius = BreastCollidersEnabled ? 0.10f * BreastSize : 0; pat.Params[1].CollisionRadius = BreastCollidersEnabled ? 0.08f * BreastSize : 0; #elif AI || HS2 pat.Params[2].CollisionRadius = BreastCollidersEnabled ? 1.0f * BreastSize : 0; pat.Params[3].CollisionRadius = BreastCollidersEnabled ? 0.8f * BreastSize : 0; #endif } dynamicBone.GetType().GetMethod("InitNodeParticle", AccessTools.all).Invoke(dynamicBone, null); dynamicBone.GetType().GetMethod("SetupParticles", AccessTools.all).Invoke(dynamicBone, null); dynamicBone.InitLocalPosition(); if ((bool)dynamicBone.GetType().GetMethod("IsRefTransform", AccessTools.all).Invoke(dynamicBone, null)) { dynamicBone.setPtn(0, true); } dynamicBone.GetType().GetMethod("InitTransforms", AccessTools.all).Invoke(dynamicBone, null); }