You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
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:
+10
-2
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+16
-1
@@ -453,11 +453,26 @@ public:
|
||||
* Apply an external strain to specific piece of the geometry collection
|
||||
* @param ItemIndex item index ( from HitResult) of the piece to apply strain on
|
||||
* @param Location world location of where to apply the strain
|
||||
* @param Radius radius from the location point to apply the strain to ( using the center of mass of the pieces )
|
||||
* @param PropagationDepth How many level of connection to follow to propagate the strain through
|
||||
* @param PropagationFactor when using propagation, the factor to multiply the strain from one level to the other, allowing falloff effect
|
||||
* @param Strain strain / damage to apply
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category = "ChaosPhysics")
|
||||
void ApplyExternalStrain(int32 ItemIndex, const FVector& Location, float Strain);
|
||||
void ApplyExternalStrain(int32 ItemIndex, const FVector& Location, float Radius = 0, int32 PropagationDepth = 0, float PropagationFactor = 1, float Strain = 0);
|
||||
|
||||
/**
|
||||
* Apply an internal strain to specific piece of the geometry collection
|
||||
* @param ItemIndex item index ( from HitResult) of the piece to apply strain on
|
||||
* @param Location world location of where to apply the strain
|
||||
* @param Radius radius from the location point to apply the strain to ( using the center of mass of the pieces )
|
||||
* @param PropagationDepth How many level of connection to follow to propagate the strain through
|
||||
* @param PropagationFactor when using propagation, the factor to multiply the strain from one level to the other, allowing falloff effect
|
||||
* @param Strain strain / damage to apply
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, Category = "ChaosPhysics")
|
||||
void ApplyInternalStrain(int32 ItemIndex, const FVector& Location, float Radius = 0, int32 PropagationDepth = 0, float PropagationFactor = 1, float Strain = 0);
|
||||
|
||||
/**
|
||||
* Crumbe a cluster into all its pieces
|
||||
* @param ItemIndex item index ( from HitResult) of the cluster to crumble
|
||||
|
||||
Reference in New Issue
Block a user