Really enjoyed Stoneblock modpack for Minecraft but there were so many mods and they all had different user interfaces. So, mostly for learning, I decided to see what I could do to make this in UE.
After a few hours, I had the basics... A voxel room that can expand infinitely in any direction!
Just shoot the walls and the shot block disappears and new blocks are spawned behind it.
LineTraceByChannel is used to check neighboring blocks in each direction. Below is the blueprint code for checking front and back in the y direction. If nothing is detected, a new block is spawned. The trick to this is that a empty space block is spawned where the stone block disappears from.
The trick to getting this to work is that for the LineTraceByChannel to detect the empty block the collision has to be set to Custom Collision Enabled and only set block on the visibility for the Collision Box.
Below is the code for Saving
Below is the code for Loading
Below is the code for the game menu. Had to learn about the Set Input Mode Game And UI block.
Here is the rest of the code for the stoneblock blueprint.
Pretty simple so far. The next part will be a little more involved. Creating the inventory, placement , and item systems! After I get those basics done I will make trees! I am sure I will run out of steam on this but who knows..
No comments:
Post a Comment