Unreal PCG Spawn Dynamic Mesh ignores rotation

Trying to Spawn dynamic mesh using PCG I noticed that trying to rotate the actor after the mesh has been spawned doesn’t rotate the mesh itself …

The core problem is: When the Actor hosting the PCG Component (and thus these generated meshes) is rotated in the world, the meshes generated by both custom nodes (floor and walls) correctly display this rotation while the actor is being interactively rotated in the editor. However, as soon as the mouse is released (triggering a PCG graph regeneration), the generated meshes snap back to an orientation that is aligned with the world axes, although they remain correctly positioned at the actor’s location. The actor itself remains rotated, and debug visualizations of the input splines and PCG points correctly show the actor’s rotation.

This happens whatever the input for the “Spawn Dynamic Mesh” node is … happens even if you use a simple StaticMeshToDynamicMeshElement. I’ve pinned it dow to one location in the codebase :

void UPCGDynamicMeshManagedComponent::MarkAsReused()
{
	Super::MarkAsReused();
	
	// We need to reset the transform is we re-use the component. Similar to ISMC code.
	if (UDynamicMeshComponent* Component = GetComponent())
	{
		FVector TentativeRootLocation = FVector::ZeroVector;
		
		if (USceneComponent* RootComponent = Component->GetAttachmentRoot())
		{
			TentativeRootLocation = RootComponent->GetComponentLocation();
		}

		// Since this is technically 'moving' the component, we need to unregister it before moving otherwise we could get a warning that we are moving a component with static mobility
		Component->UnregisterComponent();
		Component->SetWorldTransform(FTransform(FQuat::Identity, TentativeRootLocation, FVector::OneVector));
		Component->RegisterComponent();
	}
}

I believe this is the culprit for this behavior as it sets the world transform of the UDynamicMeshComponent.

Rotation: FQuat::Identity (no rotation in world space).

Location: TentativeRootLocation (the actor’s world location).

Scale: FVector::OneVector (unit scale in world space).

Result The UDynamicMeshComponent is now positioned at the actor’s world location, but it’s aligned with the world axes (no rotation, unit scale). Its relative transform with respect to the (potentially rotated) actor is no longer identity.

This is particularly annoying as you cant properly rotate your actor after the pcg graph has run

Maybe there’s a workaround I’m not aware … I’m gonna try to wrap the PCG in a scene component maybe ?

If the devs are reading this ( didn’t know where else to submit this issue ) let me know what the workaround is or maybe offer us an alternative to this rotation reset ?

Thanks a lot for any help