New geometry collection damping APIs don't handle internal parents

Hello, I was taking a look at the new APIs UGeometryCollectionComponent::SetLinearDamping and SetLinearDampingPerTransform in 5.8, and noticed that internal parents use the default damping. E.g. if you call SetLinearDamping with a really high value like 10 and then break the GC in a way that internal parents are created, you can see clearly that the damping value is not applied to the internal parents. That’s something you might want to change. My suggestion would be to use the original cluster’s value. You might also consider allowing internal parents’ item indexes as input to SetLinearDampingPerTransform, so e.g. if I do a query and want to change the damping of the things that the query hits, I can pass the hit item.

This probably all applies to the angular damping APIs as well, but I haven’t tested them.

[Attachment Removed]

Steps to Reproduce
Create a geometry collection, call SetLinearDamping() with a very high value like 10.0, and apply strain to break it in such a way that internal parents are created. The internal parents don’t use the increased damping, and SetLinearDampingPerTransform() does not accept their item indices.

[Attachment Removed]

Hi

Thanks for reporting this issue

I had a quick look at CreateClusterParticleFromClusterChildren where internal clusters are created and the code shows that the original cluster values should normally be transferred over to the internal cluster

NewParticle->SetLinearEtherDrag(Parent->LinearEtherDrag());
NewParticle->SetAngularEtherDrag(Parent->AngularEtherDrag());

I’m going to repro it on my end to verify why this is not working properly

Also, can you confirm you are using simple geometry collection and not using cluster unions ? ( Cluster union do have their own code path )

[Attachment Removed]

Hi,

I just fixed the Crumble All Active Clusters, this was a different issue

Here’s the commit ( the fix will be in the 5.8 release as well )

https://github.com/EpicGames/UnrealEngine/commit/6f196152e883d21a0c761ef59e49ba14004f275f

[Attachment Removed]

Hi, thanks for taking a look. I’m not using cluster unions. I think you’re right that the internal parent inherits the drag, my original description was wrong. It’s just if you change drag after the geometry collection already broke, then it applies to all of the regular transforms but not to the internal parents. Something else I noticed while looking at this, maybe related, Crumble All Active Clusters doesn’t break internal parents.

[Attachment Removed]

Ah good point about the post-break issue

I think that can be fixed easily

I’ll have a look at the crumble active cluster too , the fix may be very similar actually

[Attachment Removed]

Hi

I just put a fix for the general damping functions

I haven’t yet changed the one that takes an array but will have a look

next will be the crumbling functions too

Here’s the github commit

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

[Attachment Removed]