top of page
Search

Week 2: New Terrain! Our First Scripts

Writer's picture: Lily SpearmanLily Spearman

Updated: Oct 6, 2020

September 15, Second Class

 

This week in class we had our first experience writing code!  We used visual studio which was not the default program on my computer for opening my first script.  The class had a few technical difficulties that were similar to this. It is surprisingly difficult to work through these issues especially when students are using computers that vary vastly in age and model. I originally thought that a creative technology class should have not issue going remote but not I can see how it would be easier to do this work on campus in a computer lab. After making visual studio my default program I was able to move on to learning about how to write code for the C# script that we were using in Unity.  I spent a bit of time on the Unity site and on google trying to figure out how to add to my script.


Which were the most difficult to grasp? 


I was surprised by how many small mistakes can make a big impact while using Unity and Visual Studio.  At one point I had put a squiggly bracket in the wrong place in my script and it took me a shocking amount of time to correct it!  I hope that as we move forward these types of small issues will become more and more easy for me to spot and resolve. I am slowly learning to understand how to write a little bit of code. I have limited experience and find it to be very helpful to google the problems and use the unity website.  I found this link on the unity website to be helpful: https://docs.unity3d.com/ScriptReference/Rigidbody.html.  When playing my game I was frustrated because I felt like my camera was quite close to my object to get a sense of where the next hill would be.  After a lot of googling and some trial and error I was able to figure out how to write a little bit of code that allowed me to zoom in and out by pressing j and f. Here is the code:

        if (Input.GetKeyDown("j"))

        { Debug.Log("j Key Pressed"); zoomIn += 5;}

        if (Input.GetKeyDown("f"))

        {Debug.Log("f Key Pressed"); zoomIn -= 5;



Which are you excited to explore more?


So far the aspect of this that has been the most fun has been painting textures and adding elevation to my terrain.  I love the freedom of scale that is provided when painting in Unity.





I was able to download some furniture from the asset store! I was surprised by how hard it is to get everything to line up properly. This small house took me longer to make than I would like to admit. I put some pillars near the edge of my terrain because I sometimes accidentally let my sphere fall of the terrain.




5 views0 comments

Recent Posts

See All

Comentarios


bottom of page