Unreal Engine 4 (UE4) How to create a pickup using blueprints - pickup object gets destroyed and uses a particle effect (emitter) to show the destruction.
Share
First, select a mesh that you would like to use as a pickup in the content browser. Right click on that mesh and select create a blueprint. Name the blueprint and select the folder that you would like this blueprint to be saved. The mesh will need to have no collision, so it is possible to walk through it. To do this, select the mesh in the blueprint and go to the details panel and scroll down to Collision and in the collision presets, select overlap all. Go to the graph and select the mesh in the My Blueprint panel and in the graph, press the right mouse button to bring up the context menu and select add OnComponentBeginOverlap event. A node to destroy the pickup mesh will be needed so the mesh will disappear when the pawn touches the pickup. To do this, right click on the graph and type destroy and select destroy actor. To show the particle effect, an emitter node is added by right clicking on the graph and typing emitter and select spawn emitter at location. Under the emitter template, select the particle effect that you would like to use to show the destruction of the pickup actor. Use a get actor location node for the location of the spawn emitter. Wire the BeginOverlap event to the spawn emitter and the spawn emitter to the destroy actor.