Wednesday, October 16, 2019

Milestone 1 - Where I am at currently

 For our first milestone project, I am creating a guillotine. It is a deceptively simple machine. I first created the main assets of the guillotine and lever in tinkercad.


When I imported the assets into Unity I originally used a mesh collider for all the parts. This did not work very well for the guillotine. As the main body is one piece it created a strange angular shape that would not allow for anything to rest on the plank of the guillotine. It was better to just create rough shapes with multiple box colliders. As for the guillotine blade and lever, the mesh colliders work nicely.
 Things I want to work on this week is:
-Animating both the falling of the blade and lever.
-Create scripts to allow the user to pull the lever and then trigger the falling of the blade.
-Work on the actual blade slicing.
-Create a small environment as a setting so it's not just a plane floating in space.

Wednesday, October 2, 2019

Rube Goldberg Event...now with scripts!

For this version of the Rube Goldberg event, I imported 2 objects from the unity store: Donuts and plate03. I gave them both mesh colliders and I wanted to use them as stand-ins for the original pink cube and end green cube. The Donuts asset seemed to have a bounce physics already added to the prefab that I was not able to find in the inspecter to change, so I just had to readjust where the original end point was located to compensate.
With the new assets, I wanted to script end the whole event with a particle sparkle when the Donuts collided with the plate03. Unfortunately, I was never able to get to work. I looked up online many ways to fix the issue but was none seemed to trigger the particle effect on collision. You can view my code below.



I then decided to just add a color change effect when the Sphere collides with the dominoPlatform turning it to white. Here I had another issue that the color would not visibly change in the play window but when viewing the video you can see on the right-hand side in the inspector that the color does change to white on collision. I'm not sure what was going wrong there, I even tried taking off the material shader of brown just in case that was overriding the color change, but it would still stay the original color. Code for that below.





The script that did work for me was that at the beginning of the event I added a user input where on pressing of the spacebar would raise my newly created pink wall. Instead of the Sphere falling in from the sky this wall is now blocking the Sphere from starting the event until the user decided to. This wall is frozen on the X & Z axises and in the script, I added a public yPush so that I would be able to change the force of the keystroke while in Unity.


I would like to work more on how to understand what script conponats are available and understanding how they work in a more intuatave way than just googling any issue. Most examples online are able game creation and player modle interaction which I did not find very helpful.