What is the difference between OnActorHit and OnComponentHit?

I feel both of them are the same, have the same functionalities, and can accept the same delegates.

What makes them different among themselves? Thanks in advance.

Think of components as being children of Actors.

Imagine an actor that represents the car. Pretend the root object is the car body and each wheel is a component. If you wanted to get a hit event from the car body, you would use OnActorHit. If you wanted to get hit events from the wheels you would use OnComponentHit.

You couldn’t use OnActorHit to get hit events from the wheels because they aren’t actors, they’re components of an actor.

So, only if the actor has only 1 component, both OnActorHit and OnComponentHit will have the same function?

I don’t know if you can add a dynamic OnComponentHit for a root component or not. I’ve never tried, but I think it would be equivalent since the root component is technically a component. It’s probably just easier to think in terms of the collision geometry that you have. If your root component is a SphereComponent with collision enabled then OnActorHit.

If your root component is an arrow component and all the collision bodies are underneath it, then OnComponentHit.

Thank you for clearing this up for me.

Digest in Japanese