Description

Because UniagaradataInterfaceChaosDestruction::HandleTrailingEvents does not respect incoming TrailingEvent data, the debris velocity during chaos cache playback is always evaluated as zero.

The following workaround works but there is no PhysicalMaterial Mask Implementation :

void UNiagaraDataInterfaceChaosDestruction::HandleTrailingEvents(const Chaos::FTrailingEventData& Event)
{
...

#if 0
	if (GeometryCollectionComponentsFromBreaking.Num() > 0)
	{
		TArray<UGeometryCollectionComponent*> ComponentsToRemove;
		for (auto& GeometryCollectionComponent : GeometryCollectionComponentsFromBreaking)
		{
			if (GeometryCollectionComponent)
			{
...
			}
		}
		for (UGeometryCollectionComponent* ComponentToRemove : ComponentsToRemove)
		{
			GeometryCollectionComponentsFromBreaking.Remove(ComponentToRemove);
		}
	}
#else
	for (auto& Data : Event.TrailingData.AllTrailingsArray)
	{
		if (Data.Velocity.SquaredLength() >= TrailMinSpeedToSpawnSquared)
		{
			Chaos::FTrailingDataExt TrailingData;

			TrailingData.Location = Data.Location;
			TrailingData.Velocity = Data.Velocity;
			TrailingData.AngularVelocity = Data.AngularVelocity;

			TrailingData.Mass = Data.Mass;
			TrailingData.BoundingboxVolume = 1000000.f;
			TrailingData.BoundingboxExtentMin = 100.f;
			TrailingData.BoundingboxExtentMax = 100.f;
			TrailingData.SurfaceType = 0;

			TrailingEvents.Add(TrailingData);
		}
	}
#endif
}

Steps to Reproduce
  1. open the repro project [Link Removed]
  2. (optional) Open /Game/P_ChaosNiagara level
  3. (optional) Start PIE to record chaos cache
  4. (optional) Make sure particles are spawned by trailing event
  5. (optional) End PIE
  6. open /Game/P_ChaosNiagaraPlay level
  7. Start PIE

Result:

No particles are spawned

Community References

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-220244 in the post.

0
Login to Vote

Unresolved
ComponentUE - Niagara - Data Interface
Affects Versions5.4
Target Fix5.5
CreatedJul 26, 2024
UpdatedAug 13, 2024
View Jira Issue