Disable collisions for components of physics constraints not working

Hi there,

I’m having an issue with the ‘disable collisions’ on the physics constraint. I succesfully constrain two components with the physicsconstraint, and I disable collisions in the constraint, but the two two component keep generating hit event (NotifyHit keeps firing).

This is the code I use:


void AStickyAttachment::GlueballHit(int number, UPrimitiveComponent* myComp, AActor* otherActor, UPrimitiveComponent* otherComp, FVector HitLocation)
{
	static int hitnumber = 0;
	hitnumber++;
	UE_LOG(LogTemp, Warning, TEXT("GlueballHit %i"), hitnumber);
	UPhysicsConstraintComponent* constraint = ConstructObject<UPhysicsConstraintComponent>(UPhysicsConstraintComponent::StaticClass(), shape, *FString::Printf(TEXT("otherconstraint%i"), number));
	constraint->AttachTo(shape->GetRootComponent());
	constraint->SetDisableCollision(true);
	constraint->SetLinearXLimit(ELinearConstraintMotion::LCM_Locked, 0);
	constraint->SetLinearYLimit(ELinearConstraintMotion::LCM_Locked, 0);
	constraint->SetLinearZLimit(ELinearConstraintMotion::LCM_Locked, 0);
	constraint->SetAngularSwing1Limit(EAngularConstraintMotion::ACM_Free, 0);
	constraint->SetAngularSwing2Limit(EAngularConstraintMotion::ACM_Free, 0);
	constraint->SetAngularTwistLimit(EAngularConstraintMotion::ACM_Free, 0);
	constraint->SetWorldLocation(HitLocation);
	constraint->SetConstrainedComponents(otherComp, NAME_None, myComp, NAME_None);
	constraint->RegisterComponent();
}

Has anyone encountered this before? Are there conditions under which the disable collisions do not work?