Added variable boobs physics depending on boobs support from clothing

This commit is contained in:
2026-05-31 15:58:54 +03:00
parent aefabc8ed7
commit 7cc82255df
16 changed files with 49 additions and 21 deletions
Binary file not shown.
Binary file not shown.
@@ -111,4 +111,11 @@ public:
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly)
TArray<EBodyPart> HiddenBodyParts;
UPROPERTY(EditDefaultsOnly,
BlueprintReadOnly,
meta = (EditCondition = "SlotType == EClothingSlotType::UnderwearTop || SlotType == EClothingSlotType::Top || SlotType == EClothingSlotType::Bodysuit",
ClampMin = 0.0f, ClampMax = 1.0f,
UIMin = 0.0f, UIMax = 1.0f))
float BoobsSupport = 0.0f;
};
@@ -82,6 +82,24 @@ float UClothingManager::GetEffectiveCoverage(const EBodyPart BodyPart)
return MaxCoverage;
}
float UClothingManager::GetBoobsSupport()
{
const UClothingItemInstance* UnderwearTop = GetSlotClothing(EClothingSlotType::UnderwearTop);
const UClothingItemInstance* Top = GetSlotClothing(EClothingSlotType::Top);
const UClothingItemInstance* Bodysuit = GetSlotClothing(EClothingSlotType::Bodysuit);
TArray<float> TotalSupports;
if (UnderwearTop)
TotalSupports.Push(UnderwearTop->GetClothingItemDefinition()->BoobsSupport);
if (Top)
TotalSupports.Push(Top->GetClothingItemDefinition()->BoobsSupport);
if (Bodysuit)
TotalSupports.Push(Bodysuit->GetClothingItemDefinition()->BoobsSupport);
return FMath::Max(TotalSupports);
}
void UClothingManager::HydrateClothing()
{
USaveSubsystem* SaveSubsystem = UGameplayStatics::GetGameInstance(GetWorld())->GetSubsystem<USaveSubsystem>();
@@ -47,6 +47,9 @@ public:
UClothingItemInstance* GetSlotClothing(EClothingSlotType SlotType);
bool IsBodyPartExposed(EBodyPart BodyPart);
float GetEffectiveCoverage(EBodyPart BodyPart);
UFUNCTION(BlueprintCallable)
float GetBoobsSupport();
void HydrateClothing();