Handling Collision
To handle collision, you need to use an overlap event. Go to the Components panel and right-click on StaticMesh. From the context menu, select Add Event\Add OnComponentBeginOverlap.
This will add the OnComponentBeginOverlap (StaticMesh) node to your Event Graph.
Finally, create a DestroyActor node and link it to the OnComponentBeginOverlap (StaticMesh) node. As its name suggests, it will remove the targeted actor from the game. However, since there is no target, it will destroy the actor that called it.
Placing the Item
Close the Blueprint editor and then make sure you are in the Blueprints folder.
Start placing bananas into the level by left-clicking and dragging BP_Banana into the Viewport.
Click Play and start collecting the bananas!
Where to Go From Here?
You can download the completed project here.
You are now one step closer to becoming an Unreal Engine expert. I hope this tutorial didn’t drive you bananas.
If you want to keep learning, check out the next post in the series, where I cover more about materials in Unreal Engine.