Use sphere component of another actor to cause damage?

Hey @TheSurgeon.

Here, are you inside the Character actor calling the OnComponentBeginOverlap? Maybe that is the problem, since the component is a child actor and not a sphere component directly.

What actor are you using as a ChildActor here? you could have a class AMyGrenade and set that as the child actor here (I’m not sure if the child is actually the grenade). Then, you should call that OnComponentBeginOverlap inside the AMyGrenade class, so you know you are receiving the overlap event from the explosion sphere. If you decide to go this way, then the code that handles the explision should also be inside the AMyGrenade class.

With this, you should be getting the event correctly. After this you only need to choose a way to handle this event. You could have the AMyGrenade class cause the damage directly. Do this by setting the Character as the Owner actor when you spawn the grenade, so you can pass the player as the WhoIsCausingDamage variable for HitEnemy function.

You can also have the grenade call a function in the player to cause the damage. That is your choice really.

Hope this helps. If this didn’t answer your question please elaborate :slight_smile: