Download

How do you get a static mesh actor to be destroyed on being hit by a bullet?

How do you get a static mesh actor to be destroyed on being hit by a bullet?

in your bullet’s HitEvent (Or BeginOverlap if you want to use that) cast the Other Actor Paramter to StaticMeshActor and then use “DestroyActor” to destroy it.
Destroy means it get deleted. However, now every static Mesh can be destroyed, you probably want to get the StaticMeshComponent of the StaticMeshActor and check if it is a specific Mesh.

If you want to use a Destructible, i.e. something that breaks apart when hit, you should use DestructibleMeshes, these need to be generated before runtime and are a special kind of asset. You can create a destructible Mesh out of a Static Mesh by rightclicking the Mesh in the Content Browser.
Again, use the Hit Event of the Bullet and this time, cast the Other Actor to “DestructibleMeshActor” and add an amount of Damage to this actor.
If the Damage is bigger than the Damage threshold of the DestructubileMesh, it will break apart.