How do I destroy an Actor when it touches any other Actor/Mesh?

Hi everyone, I’m a student making a game that involves spells, and I wanted this spell of mine to be destroyed the moment it touches any actor or anything in the game environment, basically. What would be the ideal way to do that?
I’ve tried experimenting with Actor Begin Overlap and also collision presets, but since I haven’t learnt about those in detail I’m a bit lost. I hope I can get some help here.

This will do the trick.

Hey there! Thanks for your suggestion. Unfortunately, it didn’t work. I remember trying this out myself. Do any of my component/actor properties need to be changed in order for this to work?

Yea, You have to tweak Collisions channel of the sphere collission component, to be sure it triggers on the actors/Objects/Component you want.
Also, be sure it doesn’t hit its own mesh(Set Collision off) or any of its own component…

for this simple exemple above I made an Actor BulletBP with a SphereCollision and a StaticMesh (for visibility).
The staticMesh has nocollision, the Sphere is as follow, anything that block will trigger the Hit, here only Pawns

Make sure to check the collision box for BOTH objects.

Okay so I have created a new collision preset called ‘Environment’, and it’s supposed to Block everything. I’ve also created an object type called Spells. I’ve applied the Environment preset to a wall in my game, so it should block the spell; but it’s not. The spell still passes through. Here are a few screenshots (I realised I’d forgotten to check the ‘Block’ check box in Collision Responses after I took the screenshots, but checking it didn’t make a difference either).

The first image contains my spell’s component structure.

The second image contains my Environment preset.

The third image contains the collision settings of my spell’s sphere collision.

The fourth image contains the collision settings of my spell’s static mesh.

Here the set up I came with to test quickly test your question earlier:

The static mesh has no collision.

Maybe use a cast if it’s an actor which you play

Yes I’ve used the collider in my blueprint as well. I’ve used the exact same nodes. I’ve also made sure my static mesh has collisions. I’ve attached a screenshot below.

if your wall is a custom mesh you imported, make sure it has collision at all. Find the StaticMesh, doubleclick and check if it has a collision box…
Anyway, I’d say it’s better to implement something individually, test and then add more stuff.

For exemple, you wanna throw a ball which will be destroyed when it hits a wall?
Don’t implement the whole thing in a shot.
Let’s say:
Work your magicball, throw it on a default wall. It works? Great!
Now import your own wall if it doesn’t work, you’ll know the issue is not the ball…

That would be my workflow, one thing at a time. Nothing worst to search issue where there is no.

So right now, my wall does have collisions, because my player character gets blocked when he walks into it. So I know the collision of the wall isn’t the problem…
Also, I put out a Print String to check if On Component Hit (Sphere) gets called or not, but it doesn’t. That’s really odd. Despite me specifying that every collision has to be blocked, the Sphere isn’t hitting anything in the game. My wall has also been instructed to block everything.

Does it make a difference if my Spell has got a Projectile Movement component?

You should create a new Blueprint project, using FirstPerson Template. Navigate to the Projectile blueprint, right click>>Asset Action>>Migrate to your own project.
Then use it as a base for your own.

I checked out the Collision Presets, object types, etc. of the FirstPerson Template. I tried implementing those in my game as well with respect to the environment as well as my spell. Nothing seems to work. I’m just at a loss for ideas.

These Collisions are okay right? I’ve checked the ‘Customized Collision’ checkbox, and I’ve also selected ‘Use Complex Collision as Simple’ in the Collision Complexity options.

Looks good to me :slight_smile:
You know, your projectile mesh doesn’t need collision, the SphereCollision component in the Blueprint should take care of it.

Oh alright I’ll turn off collision in my projectile mesh.
It’s really odd that the collisions aren’t working then. I guess I’ll have to consult my professor. He tends to get a little overwhelmed by all my doubts haha.

For bullet im using “Event Hit” in projectile BP:

I’ve already tried with Event Hit to no avail, sadly.