Problem with collisions on mesh particles when spawning from Destructible Mesh

I made destructible mesh of a wall. On destruction I added a particle system of some smoke and stones. Stone are particle meshes with collisions to add more details. When I spawn particle effects on level collisions work. But when they are spawned from destructible meshes collision just doesn’t occur. Is this a bug?

GPU particles work but U cant use meshes on gpu’s simplified collisions. I ve tried on my build and on content example. Happens every time. PC.

void UParticleModuleCollision::Update(FParticleEmitterInstance* Owner, int32 Offset, float DeltaTime)

AActor* Actor = Owner->Component->GetOwner();

	if (!Actor && Owner->GetWorld()->IsGameWorld() )

	{

		return;

	}

Commenting this return fix problem but we are sure that it was there for a reason…

Hi SatanicBlood,

I just reproduced your issue and I am going to submit this to developers to look into. As a work around, change your Destructible Mesh’s collision from Destructible to BlockAll under Details panel. change may not be apparent in viewport but it should work when level is played.

Let me know it this works for you.

Thanks, TJ

In 4.4 particle system will only collide with objects with ObjectType WorldStatic.

I submitted a fix for this so that you can pick whatever types you want. You should be able to change destructible ObjectType to WorldStatic to get collision to work. You can also grab my change and then you should be able to properly add object types you care about:

https://github.com/EpicGames/UnrealEngine/commit/e0872056b1f8404342e249c85334c586215b0df0

This should be fixed in 4.5

Hi Ori, I had some time to spare on this issue, first of all your change is good but old particle collision module created in pre 4.5 without selected collision types are tracing everything, not only ECC_WorldStatic.

Results:

UParticleSystemComponent::ParticleLineCheck
ObjectParams = {ObjectTypesToQuery=0 }

Compared to:

FCollisionObjectQueryParams bla(ECC_WorldStatic);
bla = {ObjectTypesToQuery=1 }

Of course when I added second ECC_WorldStatic to collition types in particle collision module:

ObjectParams = {ObjectTypesToQuery=1 } 

ObjectParams is correct.

It seems something isn’t initialized properly. And now we need to revert your change or re-set every particle with collision module to get ECC_WorldStatic :wink:

Of course issue SatanicBlood described isn’t fixed, because particle spawned with UGameplayStatistics doesn’t have Owner

Take a look again at:

void UParticleModuleCollision::Update(FParticleEmitterInstance* Owner, int32 Offset, float DeltaTime)

AActor* Actor = Owner->Component->GetOwner();
bool IsGameWorld = Owner->GetWorld()->IsGameWorld();

Actor = 0x0000000000000000 <NULL>
IsGameWorld = true

This condition completely disable particle system collision module:

if (!Actor && Owner->GetWorld()->IsGameWorld() )
{
  return;
}

This is real issue here.

Regards

Pierdek

Closing answer without replying to comments is “really bad” support.

In 4.6 every time when I restart editor after re-setting collisions ObjectParams is resettet to 0, which collide with everything.

I added to:
void UParticleModuleCollision::Serialize(FArchive& Ar)

this piece of code:

if (Ar.IsLoading())
{
	ObjectParams = FCollisionObjectQueryParams(CollisionTypes);
}

and it seems collisions finally works as expected.

Hey Pierdek -

I do not have access to GitHub user names but if you feel that you have solved an issue with engine, please post a GitHub pull request to insure that our engineers review it in context.

Thank You

Eric Ketchum

Hi Pierdek,

Sorry you’re still experiencing issues with this. It is likely issue was marked resolved when one of staff responded (it happens automatically) or it is possible SatanicBlood accepted an answer. I have reopened issue and moved it to Bug Reports, and assigned issue to one of our support staff to look into. It looks like you were able to fix issue with a code change; have you submitted a GitHub pull request as Eric Ketchum has suggested?

Hi ,
I haven’t submitted pull request, because I think my solution is little hacky, I pointed here my observations and I was waiting for answer.

Hello -

I have tested this extensively on our internal branch and can confirm that there is an issue here, I have entered it as UE-7001. As we continue to investigate and work toward a solution I will keep you all informed.

Thank You

Eric Ketchum