ONCOMPONENTBEGINOVERLAP Events
When an object has a collision body, the colleague collision type is set to Overlapall, and the character is not blocked.
This is the case code for Oncomponentbeginoverlap in the document
//set up a notification for if this component overlaps somethingCollisionsphere->oncomponentbeginoverlap.adddynamic ( This, &alightswitchcodeonly::onoverlapbegin); voidAlightswitchcodeonly::onoverlapbegin (classAactor* Otheractor,classUprimitivecomponent* Othercomp, Int32 otherbodyindex,BOOLBfromsweep,Constfhitresult&Sweepresult) { //Other actors are the actor that triggered the event. Check that's not ourself. if((Otheractor! = nullptr) && (otheractor! = This) && (Othercomp! =nullptr)) { //Turn off the lightPointlight->setvisibility (false); } }
Recently wanted to write a ghost-like to collect the red soul function, and write something as notes