# C++ and Blueprints, Setting collision presets from code being overwritten by Blueprint

**URL:** <https://forums.unrealengine.com/t/c-and-blueprints-setting-collision-presets-from-code-being-overwritten-by-blueprint/575813>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine\
**Created:** [June 7, 2022, 2:25am UTC](https://forums.unrealengine.com/t/c-and-blueprints-setting-collision-presets-from-code-being-overwritten-by-blueprint/575813 "2022-06-07T02:25:56Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![vagabond00](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@vagabond00](https://forums.unrealengine.com/u/vagabond00)\
**Post date:** [June 7, 2022, 2:25am UTC](https://forums.unrealengine.com/t/c-and-blueprints-setting-collision-presets-from-code-being-overwritten-by-blueprint/575813/1 "2022-06-07T02:25:56Z")

</div>

Hi there,  
I have a quick question about blueprint interaction with C++ code.

I am following the Tom Looman C++ tutorial and at 57:00 he is changing the mesh collision settings with the following code:

> MeshComp = CreateDefaultSubobject(TEXT(“MeshComp”));
> 
> MeshComp-\>SetCollisionResponseToChannel(ECC\_Pawn, ECR\_Ignore);

In the tutorial, he then navigates the the MeshComponent \> Collision settings window and his reads Collision Presets: Custom and has the Pawn setting changed here. Mine says “Default” instead and I can’t seem to find a way to get the same results.

Reading some posts : [Here](https://forums.unrealengine.com/t/bp-based-on-c-class-does-not-reset-a-components-defaults/396456/4) and [Here](https://forums.unrealengine.com/t/collision-response-set-in-c-but-not-visible-in-blueprint/136334/2)  
Seem to suggest (and apologies if I am wrong on this) that the Blueprint is serialized, including its settings, after the C++ is run, so it will maintain its own settings that will overwrite any C++ constructor settings.

My questions are:

1. Do I understand this generally correctly?
2. How can I reset the BP back to show the default C++ settings (someone suggested a little yellow arrow I can’t find and the link is dead)
3. Anything else I am missing about this that is important to know? Am I making general sense?

I’ll post His example: (what I am expecting to see) with the Pawn setting changed to ignore.

 ![Tom Loomin Physics settings](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/e/9/5e9ae6a422b21ec550ca56a34d5679985fa08ef6.png)

and my output with the Default settings.  
 ![My Physics settings](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/7/3/07383e324935dca25cd8980ff1f3e643533e6f6b.png)

I just wanted to add that I tried creating a new Blueprint object based on the same code but it doesn’t seem to make a difference. Also, I am working in UE5 and the tutorial is old so perhaps it is an inconsistency here?

Thanks in advance and sorry if this is a noob question ( I am noob with Unreal)
