Jump to content
  • Advertisement
Sign in to follow this  
  • entries
  • comments
  • views

Grids Pro Asset Offset

Brayden Beavis



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.



Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!