# Actor's Collision Responses being overridden when actor is spawned

**URL:** <https://forums.unrealengine.com/t/actors-collision-responses-being-overridden-when-actor-is-spawned/1894464>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine, question\
**Created:** [June 7, 2024, 9:46pm UTC](https://forums.unrealengine.com/t/actors-collision-responses-being-overridden-when-actor-is-spawned/1894464 "2024-06-07T21:46:48Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Zakkerheim](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Zakkerheim](https://forums.unrealengine.com/u/Zakkerheim)\
**Post date:** [June 7, 2024, 9:46pm UTC](https://forums.unrealengine.com/t/actors-collision-responses-being-overridden-when-actor-is-spawned/1894464/1 "2024-06-07T21:46:48Z")

</div>

So I’m facing this issue, I have this actor blueprint set up with a capsule component using my desired configuration.  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/a/d/3ad4af7b1a73c7a015cbbd937aae0c6b3e7f384c.png)

If I start the level with this actor already present in the level, everything works as expected, however if I spawn the actor at runtime and I check my spawned actor’s capsule component I can see this values had changed to this  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/c/5/7c54c35204736b31b64063d1283be33e826f7cbb.png)

This is the code I’m using to spawn the actor, nothing special

```auto
TSubclassOf<AEnemyARPGCharacter> SelectedEnemyClass; // Added from the blueprint

const AEnemyCharacter* EnemyCharacter = 
    GetWorld()->SpawnActor<AEnemyCharacter>(SelectedEnemyClass, 
    GetActorLocation(), GetActorRotation());

```

The workaround I’ve found is to manually set the collision channel back to the response I want after spawning, using this code

```auto
EnemyCharacter->GetCapsuleComponent()->SetCollisionResponseToChannel
     (ECollisionChannel::ECC_WorldDynamic, ECollisionResponse::ECR_Block);

```

However, I would expect it to preserve after spawning the values I had set in the Actor Blueprint. Am I mistaken?

Hopefully someone can shed some light on this. Thanks!
