I’ve been testing AActor::ReceiveHit. I used the new Rolling Ball template in C++, created a new AActor subclass and attached the beach ball static mesh to it (so I have 2 balls in this level, the main Character and this ball). I start the game by dropping it from the air. Each time anything hits this ball - the floor, pushed cubes, the main Character/Beach ball - it produces a hit. It was easy to filter referenced objects like the actual Character ball. But what if I wanted to identify the floor and fire a “beep” sound from it on each hit ?
The floor is a StaticMesh, dropped into the scene, not part of any defined class or blueprint: can I get a reference from it in C++, through a C++/blueprint interface that could pass some identification at startup to my subclass? Or do I need to create a specific AActor subclass for it so I can filter it out ?
As a side note, I tried with bSelfMoved thinking that it went TRUE if the opposing object did not have any velocity, like hitting a floor. But no, even hitting the floor after a drop makes bSelfMoved == true. I’d love more information on that parameter.