Description

Following code works as a workaround

	void FClusterUnionManager::HandleAddOperation(FClusterUnionIndex ClusterIndex, const TArray<FPBDRigidParticleHandle*>& Particles, bool bReleaseClustersFirst)
	{
...
		if (bIsNewCluster)
		{
			if (bIsSleeping)
			{
				MEvolution.SetParticleObjectState(Cluster->InternalCluster, Chaos::EObjectStateType::Sleeping);
			}

			MEvolution.SetPhysicsMaterial(Cluster->InternalCluster, MEvolution.GetPhysicsMaterial(FinalParticlesToAdd[0]));
			Cluster->InternalCluster->SetControlFlags(FinalParticlesToAdd[0]->ControlFlags() );  // add this line to copy gravity setting
			Cluster->InternalCluster->SetLinearEtherDrag(FinalParticlesToAdd[0]->LinearEtherDrag() ); 
			Cluster->InternalCluster->SetAngularEtherDrag(FinalParticlesToAdd[0]->AngularEtherDrag() ); 
		}

Steps to Reproduce
  1. Download the repro project from the link in the AdditionalInfoURL
  2. Build and launch the repro project
  3. Start PIE
  4. Observe the rigid bodies falls slowly
    Note : the rigid bodies have custom gravity setup
  5. End PIE
  6. Select 2 `Cube_GeometryCollection`s
  7. Set ClusterGroupIndex to 1 in detail pane
  8. Start PIE

Result:

Clustered rigid body ignores custom gravity settings in children and fall with default gravity

Have Comments or More Details?

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

0
Login to Vote

Unresolved
ComponentUE - Simulation - Physics
Affects Versions5.3
Target Fix5.5
CreatedMar 7, 2024
UpdatedAug 17, 2024
View Jira Issue