Destroying AI Collider

We are trying to make it so when you shoot the enemy, their capsule collieder will be deleted. We used the Destroy Component to remove the collider and now the engine crashes. Below is the blueprint that we used for this.

The crash is probably caused by the fact that the physics simulation expects the capsule to still be there for the duration of the simulation, since you explicitly start it up for the capsule component only to immediately delete it.

Thank you for the help, do you know of a way we could fix this problem?

Well… Try not deleting the capsule, or don’t set it to simulate physics? I don’t know the bigger picture here, so options are limited. In general, when you get crashes, best approach is to narrow down the cause to a single operation so you can come up with an acceptable workaround. Of course only you know what the end goal is, and with that, what the definition of “acceptable” is.

Do you know of any way that we could remove the collider and have the mesh remain so it will look dead and lifeless? That is why we made it simulate physics but then we ran into the issue.

Assuming it’s a character with a skeletal mesh, and that it has a physics asset attached, you could probably disable collision for the capsule and activate physics simulation directly on the skeletal mesh component itself rather than the capsule or the actor.

what we did was duplicate the original character and removed the camera, and walking code. The mesh of the enemy is a child of the capsule collider. Both are “inherited” and im not sure what that means