Project theme: Peace & War
Project members: Neyva, Vince, and Nhi
Idea development:
In our first project meeting, we built upon our class discussion about Lo-Tech VR Interaction Exercise, choosing boxing/punching as one of the two main interactions in the environment we want to create. I personally like this idea because it reflects a strong action and we can integrate any unexpected response out of a punch. The users may expect the punching bag to oscillate back and forth but would have no idea what effects/responses beyond the norm. Having said that, we also hope to develop our project to resonate with one of our class readings “Responsive Environments” by Myron Krueger, making the user experience and environment more interactive and responsive. For the second interaction, we first came up with the light switch, which is an everyday activity. We tried to connect the light switch with the punching action to make a cohesive story in an artificial reality. In the end, we slightly modified the idea and chose to go with a button on a pedestal. While discussing the two actions, punching a bag and pressing a button, which is almost part of our everyday life, we hope to alternate daily interactions into some dreamlike effects in our project.
In specific, the setting would a theater stage where the punching bag and the button would be located on two opposite sides. We alternate the reality by:
- Punching the bag: every time the user punches the bag, besides the normal oscillation, there would be white/black doves flying out magically. The white doves represent peace, and the black doves represent the concept of war.
- Pressing the button: this button would change the color of the doves. Every time the user presses the button, the color will change from white to black and vice versa.
- The stage: in the back of the stage, we are considering putting words/colors/pictures to reflect the theme of our project.
The main idea behind our project development is to demonstrate how fragile the peace and the world we are currently living in and taking for granted. When punching the bag, the users would tend to punch harder and harder to see if there is any change in the effects. Of course, there would be: more doves would fly out. However, if we take a closer look, such an increase in the intensity of each punch represents the rising conflicts among individuals/nations. Moreover, just by pressing one button, we are able to enter the state of war. This button is also the symbol of war threats such as nuclear power/weapons – by just pressing a button, peace no longer exists; a war has begun (white dove-peace changes to black dove-war).
Project development:
We first sketched the initial 360 view of our project.
We have found a few free assets that could be beneficial for our project, including stage, punching bag, gloves.
March 9, 2020
After our team discussion, we decided to minimize our interaction to only punching bag – birds flying out. The environment would be similar to the environment below
March 10, 2020
Vince and I worked on interactions of the punching bag.
The first problem we encountered was to control the boxing man when we moved the mouse. I wrote a separate script for the camera controller so that the camera position = box_man position + (proper) offset, and smoothened the interactions by using Vector3.Lerp(). However, after a few trials, we decided to use FPSController which already has the script and makes our life easier. We used the first person controller (FPSController) prefab (renamed it with “player”) and put the box_man prefab as a child of FPSController. By doing so, when we move the mouse, the boxing would move accordingly. We also positioned the camera and limited the looking angle so that we only see the hands of the boxing man.
The other part we worked on is collision detection. We decided to put the script of collision detection on the punching bag – every time there is a punch, the collision will be detected, and we will trigger the animation. In order to do that, besides detecting the collision, we also need to detect whether it is a proper punching action or not (since the collision detection can also happen when the boxing man just walks towards the punching bag and touch the bag ). We have two scripts for this: animationController and collisionDetector. In animationController, besides triggering the animation, we also put the Punch class that will return the anim.GetCurrentAnimatorStateInfo(0).normalizedTime in the get method. In collisionDetector, if we detect a collision and (call Punch and the time) < 1, we play the punch sound as if the person punches the bag.
March 11, 2020
After finishing the collision detection for the punching bag, we decided to use raycast to lighten the color of the punching bag whenever the player looks at it (to attract attention).
First, we reused the code we learned in class. However, the color did not change even though the debugging message indicated that the player was looking at the punching bag. We tried to switch the tag and the layer of different components related to the punching bag to see where the problem was. After around 1 hour, we found the problem.
First, hit.transform.gameObject did not work since the punching bag is the child component, and we need to use hit.collider.transform.gameObject instead.
Second, we can change the color of the prefab; however, the changes were not obvious to the player. Hence, we decided to change the emission color so the bag would brighten whenever the player looks at it.
March 12, 2020
We started working on generating birds every time the player punches the bag. We wrote the script birdGenerator.cs to handle this behavior.
In this script, we initialize an arraylist to store the birds. If we receive hit signal from collision detector from collisionDetector, we will instantiate a clone of the bird with different speed and position (using Random.Range) and add it to the arraylist. Later we just loop through this arraylist and set the moving direction and speed for the bird.
March 13, 2020
We worked on changing the angle of the bird animation and setting a flying path for the bird. Since we wanted the birds to fly out at a random angle, speed, and position around the punching bag, we decided to create a class bird and encapsulate all attributes into this class, and when we dynamically create the birds, we assign the random values to the attributes of the birds. This makes things consistent and easier for us if we want to add additional attributes in the future.
March 14, 2020
We worked on changing the color for the birds. The bird prefab originally had the color of red. Vince and I decided to experiment with the color when we received the environment from Neyva.
First, we tried giving each bird a random color (by giving random values for R,G,B). However, this variety of colors made the scene look extremely low poly and does not fit with what we had in mind for our final scene and our final concept of the project. Hence, we decided to go back to our original idea of doves and consistent white color for the bird.
We also decided to add background music to this project. Since we want to convey of dark & ominous environment
March 15, 2020
We worked on final touches for our project. After Neyva added the particle systems to create the fog effects, we decided not to use raycast anymore. The original idea of the raycast is to brighten up the punching bag a little bit to invite the player for a potential interaction. However, the fog makes the “brightening up” of the punching bag not obvious, so we in the end decided not to keep it. We also worked on other small fixes and on our presentation:
- Fix the position, density, and scale of the particle systems
- Fix the color of the clouds and the skybox
- Work on presentation and divide the part among team members