What is the Difference between Overlap and OnHit?
Can any one set me straight ? A overlapping of actors is when a Actor with physics (player) over lap a none physical actor. (Fire) or a trigger box? And OnActorHit is for when two physical objects collide right?
Btw the methods am referring to is.
Also when is this called
The difference that I've observed between the two events is this:
OnActorBeginOverlap fires an event when the actor begins overlapping another actor (or whatever your actor's collision component is set to overlap with). Your actor does not need to collide (block) the other actor for this event to fire. If you break the result (off the top of my head) it will give you the actor you overlapped, (surface info?) and not a whole lot more.
OnActorHit fires an event when the actor BLOCKS with another actor (your actor must be set to generate hit events in the collision properties). Overlapping will not fire this event, there must be a blocking collision. If you break this result you get the point location of the hit, normal vector information for the impact, as well as the other actor and surface information.
OnTakeAnyDamage is called when ANY type of damage is applied to the actor. Radial damage (explosions), point damage (trace hits, bullets for example), direct "ApplyDamage" calls, etc.
Your actor must be setup to receive damage (canBeDamaged bool set to true), and you can call "ApplyDamage" on it to fire the event. You then must deal with the event in the damaged class to decrement health by the passed damage value, or whatever you need to happen.
I'm not an expert on this stuff, but hopefully this helps you figure out what you're trying to do.
Follow this question
Once you sign in you will be able to subscribe for any updates here