Colony 7 relies on a grid system for assets to snap together, this is so that when an asset is in the way of the player, the player is unable to move to that space. At the beginning of the project the team were unfamiliar with Magicavoxel and how it worked, what we hadn’t originally taken into consideration is:
If I create a floor piece that is one unit deep on the Y axis;
Then I make a toolbox to sit atop of the floor, on importing into Unity, the tool box would be sitting one unit inside it.
However, if when I created the toolbox, I had started it one unit higher to count for height of the floor, this could have been avoided.
With a ‘two birds, one stone’ approach, fixing my problem and fulfilling my programming learning outcome, I created an offset script for the assets so that they would still sit correctly on the grid for functionality. Essentially the script adjusts the transform of a child in the Y axis whereas the parent object sits on the grid. This script is able to be applied to any object that needs a slight adjustment rather than having to account for the unit height of asset placement inside of Unity when building the level. This script also made changing the design of the level easier as the assets could be placed anywhere using this script, while still fitting on the grid.