After a few prototyping a few potential collectable items, in the end I decided to go with a tankard of beer. Below is a shot of me UV mapping the main body of the tankard, I felt it easier to use a texture that features a lot throughout the game, however it is varied enough to not be noticed. Below you can see me tinkering with the UVs, as well as the final model. This particular model only reached a little over 100 polygons, due to it’s wide availability in the game I didn’t feel it necessary to go overboard with the details.
The next step after creating the model was to export it to the unreal engine. I did have a few problems with this to start with, this was due to me thinking I had to pre-make the animations in blender before exporting them to the unreal engine. After just exporting the static mesh, I only had to make changes to the model’s even graph and add in a collision box.
Below you can see the two main stages of the blueprint creation. The top section of the blueprint makes the model rotate. This part was particularly simple to do, that was needed was to add in the rotation direction, then link it up to a rotation node, which was controlled by two minor nodes which set the speed. Below the rotation nodes are the ones that make the object disappear on impact. Instead of making nodes for the model this time, I created an “OnComponentOverLap” for the collision box. This could simply be connected to a DestroyActor node, however to make it less plain I brought in a particle effect.
When the blueprints were finished the tankard could be successfully placed into the scene, contrary to what I expected they cause no FPS issues what so ever.
During testing I found that the character sometimes bumps into the actual tankard object before it has time to disappear. I first made the collision box larger, however I later found that the collectable as well as it’s collision disappeared from the viewport, later I found that it wasn’t too much of an issue, as it still functioned effectively in the game.