January 28th, 2020
This week's update served as the initial demonstration of Groop Studio. The demonstration provided a means of interacting with the environment and manipulating the camera point of view.
This week's update served as the initial demonstration of Groop Studio. The demonstration provided a means of interacting with the environment and manipulating the camera point of view.
We got the most essential functionality completed this week. our tool stands to be a voxel based building software, and as such we thought it was important to create the grid on which we place our voxels, and be able to add and remove voxels. As of now, each voxel we place down is its own game object in unity, which has 6 faces, each face being a quad, which has 2 triangles, which share 2 vertices, totaling for 4 vertices per quad. Each voxel being an individual game object will eventually need to be changed, as this is more intensive on the device, and we intend to be able to have voxels placed in one session be able to function as a single entity. The grid was also required as a game object, a simple quad that the voxels can be placed on. When the player mouse moves over the grid, we have very exact coordinates that are obtained from the mouse, then converted into integer values, and displayed visually on the grid, giving the effect of a highlighted grid space where we can place a voxel.
Once we laid out the grid system we implemented adding and removing blocks. Adding was done by adding the voxel game object, which we call a cube, to the grid. since each voxel retains its own mesh (for now), we essentially just laid the meshes next to each other, giving the appearance of a single object, when in reality it is multiple individual meshes in close proximity. Removing was done very similar. using the coordinates from the mouse, we checked to see if our there was a block where we were clicking, if there was, we simply removed it from the grid. The actual data of whether or not there is a block at a given location was stored in a 3 dimensional array of ints, where the dimension indexes served as the location for the corresponding block, and the integer value at each location was either a 1 or a 0; 1 representing a voxel, 0 representing nothing at the location.
In addition to this, we also spent some time working with camera functions. The player can either use shift middle click to orient the grid and blocks together, similar to turning an object over in your hands to look at it from different angles. Or, the player can use middle click to pan the camera, as to change what is in the center of the camera's POV.
Added a grid system to place voxels on
Added middle click to rotate the camera
Added shift + middle click to pan the camera
Added scroll wheel to zoom the camera
Added left click to place a voxel
Added right click to remove a voxel