Event called when something stops overlapping this component



FComponentEndOverlapSignature OnComponentEndOverlap


Event called when something stops overlapping this component

Both this component and the other one must have GetGenerateOverlapEvents() set to true to generate overlap events.

Example Code

LightSwitchCodeOnly.cpp at line 31:

    // set up a notification for when this component overlaps something  
    CollisionSphere->OnComponentEndOverlap.AddDynamic(this, &ALightSwitchCodeOnly::OnOverlapEnd);  

LightSwitchCodeOnly.cpp at line 52:

void ALightSwitchCodeOnly::OnOverlapEnd(UPrimitiveComponent* OverlappedComp, AActor* OtherActor, UPrimitiveComponent* OtherComp, int32 OtherBodyIndex)  
    // Other Actor is the actor that triggered the event. Check that is not ourself.  
    if ( (OtherActor != nullptr ) && (OtherActor != this) && ( OtherComp != nullptr ) )  
        // Turn on the light  
Select Skin

Welcome to the new Unreal Engine 4 Documentation site!

We're working on lots of new features including a feedback system so you can tell us how we are doing. It's not quite ready for use in the wild yet, so head over to the Documentation Feedback forum to tell us about this page or call out any issues you are encountering in the meantime.

We'll be sure to let you know when the new system is up and running.

Post Feedback