Chaos geometry collection : BP functions

- extended apply external strain node to have a radius and proapgation  parameters
- added an internal strain node similar to external strain

#rb none
#jira none
#preflight 62c631b8a6654f9729a3b97a
#robomerge EngineMerge

[CL 20979120 by cedric caillaud in ue5-main branch]
This commit is contained in:
cedric caillaud
2022-07-06 21:50:26 -04:00
parent b161625580
commit 7c5a3bac01
6 changed files with 207 additions and 35 deletions
@@ -3664,11 +3664,19 @@ void UGeometryCollectionComponent::IncrementBreakTimer(float DeltaTime)
}
}
void UGeometryCollectionComponent::ApplyExternalStrain(int32 ItemIndex, const FVector& Location, float Strain)
void UGeometryCollectionComponent::ApplyExternalStrain(int32 ItemIndex, const FVector& Location, float Radius, int32 PropagationDepth, float PropagationFactor, float Strain)
{
if (PhysicsProxy)
{
PhysicsProxy->ApplyStrain_External(FGeometryCollectionItemIndex::CreateFromExistingItemIndex(ItemIndex), Location, Strain);
PhysicsProxy->ApplyExternalStrain_External(FGeometryCollectionItemIndex::CreateFromExistingItemIndex(ItemIndex), Location, Radius, PropagationDepth, PropagationFactor, Strain);
}
}
void UGeometryCollectionComponent::ApplyInternalStrain(int32 ItemIndex, const FVector& Location, float Radius, int32 PropagationDepth, float PropagationFactor, float Strain)
{
if (PhysicsProxy)
{
PhysicsProxy->ApplyInternalStrain_External(FGeometryCollectionItemIndex::CreateFromExistingItemIndex(ItemIndex), Location, Radius, PropagationDepth, PropagationFactor, Strain);
}
}