In creating an interactive space through unity, I started out with a scene
containing two basic shapes. One a flat rectangle to act as a base and
another cube as an object to focus the interaction on. With a script file
coded for the cube, users are able to move the cube by pressing on the
direction keys on their keyboard. This setup is simple yet very important as
it will serve as a foundation for any other action or addition to the scene.
➋ Addition of Shapes
After getting the basic shape to move in the scene, I have added more shapes
to create a set of buildings in the scene. Like I have done to the cube in
the first video, I have coded a script file for each of the buildings for it
to be moved through the pressing of keys on the users’ keyboards. I modified
the speed of movement for a few buildings to create a more dynamic movement
for the scene.
➌ Collision Break
Another interaction I have added to the scene is the collision of shapes
with the addition of the sphere. Instead of moving the buildings with the
keys, I have now inserted a code for the sphere to be moved towards the
buildings and to break or make the buildings disappear as soon as the sphere
collides with it. This interaction does feel a bit slow and heavy due to the
sphere’s nature but it surely comes to a nice result of wiping away every
object on the screen.
➍ Collision Fall
Through a slight modification of the script file, I created a collision fall
in the scene. This time, instead of the buildings disappearing as the sphere
rolls through, the buildings actually resist and roll back the sphere when
collided together. The user can then again move the sphere back and keep
colliding the objects together but at the end the sphere will fall like it
had in the previous scene but just backwards.