Set default collision response for a channel in C++?

Is it possible to set the default collision response for a channel in C++?

I know I can do it in ‘Project settings > Collision’ in the Trace channels tab, but I am working on a plugin and I would like to set specific default collision for a module which can be used in many games.

I am aware of this, what I want is to set the default behavior for the Trace channel (what you can do in ‘Project settings > Collision’, in the Trace channels tab)

I tried

UCollisionProfile* CollisionProfile = UCollisionProfile::Get();
FCustomChannelSetup GizmoChannelSetup;
GizmoChannelSetup.Channel = COLLISION_GIZMO;
GizmoChannelSetup.DefaultResponse = ECollisionResponse::ECR_Ignore;
CollisionProfile->DefaultChannelResponses.Add(GizmoChannelSetup);

But DefaultChannelResponses is private…

In your .cpp file:

StaticMesh->SetCollisionResponseToChannel (Channel Name, Response);

:slight_smile:

Cheers
-Nate

That is how you do it for a trace channel.

Is that not what you meant? I’m confused. Trying to help because I worked on something similar a couple weeks ago.

No, this is to set the reponse for a component.

Thank you. Exactly what I needed

Have you ever found a solution to this? I’m currently struggling with the same problem.
Set my Custom Trace Channel in the DefaultEngine.ini file but I don’t know where/how to set default responses for that channel.
Also, is it possible to make this custom trace channel visible to blueprints?