Hello dear forums.
.
I've reached a quite critical stage in my game. Here's a few lines to briefly describe what the goal is (i'll go into further details as this post comes along):
I'm trying to create a building where the player can expand the building based on "blocks" of rooms. This would give the player further area to place various gameplay objects. The functionality that displays where the player can expand, should be based on the current structure of the room. Here's a quick image that shows what I mean. The green box is the current building, and the dashed red lines is the expandable block options.

The player can click on the expandable areas to expand the building to that certain block, spawning in a new "block" of the building. Simultaneously, I wish for the walls to be removed on the current structure. If the player click the right down most expandable block, the wall blocking from the right down most current structure (green), should be removed.
Current ideas
My first ideas was to do a line trace for each building "block" in all four directions (north, south, east and west), but after realizing that my building might be the size of 8 blocks, that would mean 4 line traces per block whenever the user expands, that would make 32 line traces. I'm still somewhat new to Unreal Engine, but I'm guessing 32 line traces is not healthy for performance.
My second idea was to use a matrix to keep track of what block are available for expansion, and which blocks are occupied by an already existing block. This would however limit me to a certain size of the building, which I'd like to eliminate if possible.
Unfortunately, these are the only ideas I can think of for the time being, but I'm hoping that Unreal Engine might have some sort of tool to help with these issues, but I'm not sure what exactly. I'm hoping some of you here on the forums, might have some suggestions.
If you need further information to find a solution, please let me know
.
I've reached a quite critical stage in my game. Here's a few lines to briefly describe what the goal is (i'll go into further details as this post comes along):
I'm trying to create a building where the player can expand the building based on "blocks" of rooms. This would give the player further area to place various gameplay objects. The functionality that displays where the player can expand, should be based on the current structure of the room. Here's a quick image that shows what I mean. The green box is the current building, and the dashed red lines is the expandable block options.
The player can click on the expandable areas to expand the building to that certain block, spawning in a new "block" of the building. Simultaneously, I wish for the walls to be removed on the current structure. If the player click the right down most expandable block, the wall blocking from the right down most current structure (green), should be removed.
Current ideas
My first ideas was to do a line trace for each building "block" in all four directions (north, south, east and west), but after realizing that my building might be the size of 8 blocks, that would mean 4 line traces per block whenever the user expands, that would make 32 line traces. I'm still somewhat new to Unreal Engine, but I'm guessing 32 line traces is not healthy for performance.
My second idea was to use a matrix to keep track of what block are available for expansion, and which blocks are occupied by an already existing block. This would however limit me to a certain size of the building, which I'd like to eliminate if possible.
Unfortunately, these are the only ideas I can think of for the time being, but I'm hoping that Unreal Engine might have some sort of tool to help with these issues, but I'm not sure what exactly. I'm hoping some of you here on the forums, might have some suggestions.
If you need further information to find a solution, please let me know

Comment