💻
Coding for Creatives Spring 2021
  • Hello
  • Class Exercises
    • Week 2 (Variable) Activities
      • Getting Blobby (Processing)
      • Unity Activity Notes
      • TouchDesigner Activity Notes
      • More Variable Activities
        • Star Wars Name Exercise
        • Mad Libs Exercise
    • Week 3 (If/Else Statements) Activities
      • Rubber Ducky Activity (Unity)
    • Week 4 (Loops) Activities
      • Using For and Foreach Loops in Unity
      • More Loop Activities
        • Movement Using If Statements In Processing
        • Moving Shapes in Processing
    • Week 5 (Arrays & Lists) Activities
      • Moving Squares Activity
    • Week 6 (Functions)
      • Mario Activity
      • Raycasting (Unity)
      • More Functions Activities
        • Snake (Processing)
    • Week 8 (Randomness & Object Interaction)
      • Bouncing Ball (Unity)
    • Week 9 (Creating Custom Objects)
      • Creating Custom Objects (Processing)
      • Cannon Game (Unity)
    • Week 10 (Sensors & TouchDesigner)
      • TouchOSC
      • More Activities
        • Audio-Reactive 3D Shapes
  • Glossary and Terms
    • Blank Space / Canvas Origin
    • Shapes / Primitives
    • Color
    • Movement
    • Control
    • Variables
      • Declaring Variables
      • Assigning a Variable
      • Using a Variable
      • Data Types
        • Floating Point or Float
        • Integer or Int
        • Boolean or Bool
        • String
      • Casting a Variable
    • Arrays
      • Creating Arrays
      • Assigning Values to Arrays
      • Using Array Elements
      • Multi-Dimensional Arrays
      • Common Errors
    • Conditional Statements (If/Else)
    • Operators
      • Relational Operators
      • Mathematical Operators
      • Logical Operators
    • Loops
      • While Loops
      • For Loops
      • Foreach Loops
    • Functions & Methods
      • Creating a Function
      • Calling or Invoking a Function
      • Parameters & Arguments
    • Interaction
      • Mouse Interaction
    • Objects, Classes & Libraries
      • Accessing Objects
    • Node-Based Programming
  • Processing Info
    • Overview
    • Interface
    • Template
    • Printing to the Console
  • Unity Info
    • Overview
    • The Default Interface
    • The Windows (Tabs)
      • Hierarchy Window
      • Scene Window
      • Project Window
      • Inspector Window
      • Game Window
      • Console Window
    • Other Layouts
      • Create a Custom Layout
  • TouchDesigner Info
    • Overview
    • Popular TOPs
    • Popular CHOPs
    • Popular SOPs
    • Popular DATs
  • Arduino Info
    • Arduinos!
    • The Parts
    • The Setup
      • Using the Serial Connection
      • Output Component Setup Examples
      • Input Component Setup Examples
      • Create a Night Light
  • Templates & Shortcuts
    • Power of Negative 1
    • Modifiers
    • Start Codes
      • Processing Start Code
      • HTML, CSS, JavaScript Start Code
    • WASD Movement Code
      • Processing Example
      • Unity Example (3D)
      • Unity Example (2D Platformer)
    • Parenting Example Script
  • Useful Links
    • Share & Show Off
    • Software & Apps
    • Free & Affordable Game Assets
Powered by GitBook
On this page
  • Move / Translate
  • Rotate
  • Scale
  • Rigidbody Component
  • Creating a Material
  • Step 1: Create a Material
  • Step 2: Modify a Material
  • Step 3: Adding a Material to an Object

Was this helpful?

  1. Class Exercises
  2. Week 2 (Variable) Activities

Unity Activity Notes

PreviousGetting Blobby (Processing)NextTouchDesigner Activity Notes

Last updated 4 years ago

Was this helpful?

The activity we did was to get you practicing a little more with the Translate, Rotate, and Scale properties in Unity - all controlled by the Transform component (a built-in script) in the Inspector tab.

The Inspector tab gives you a visual representation of a text script. The three coordinates - X, Y, and Z are all floating point numbers (precision numbers that have a decimal point). Since it is a "float," as you move or click and drag over the letter to watch the numbers change, they change in a more precise range. On Friday, we will see the difference when we create integers (whole numbers) instead.

For a more in-depth look at using Translate, Rotate, and Scale, go here:

Move / Translate

Unity Shortcut: W key

Move Button:

Your object will appear to have arrows:

Rotate

Unity Shortcut: E key

Rotate Button:

Your object will appear to have circles or curves:

Scale

Unity Shortcut: R key

Scale Button:

Your object will appear to have blocks at the end of lines:

Rigidbody Component

By default, objects will not move when the game is played. The objects can also overlap.

Adding a Rigidbody component will give the object simulated gravity and will use the object's Collider component to know where the edges of the objects are. This makes overlapping items with this component explode! It also allows objects to fall and affect those around them.

Add a built-in component through the Inspector window:

Click the Add Component button.

Use the dropdown menu items to navigate to Physics > Rigidbody OR use the search and start typing the name of the component to find it:

Click on the component to add it and it will appear in the Inspector window:

Creating a Material

Materials are separate, REUSABLE "objects" (called Assets) in Unity that you create and then add to other game objects in your scene.

Step 1: Create a Material

Your Project window is a visual representation of your project folder. It shows you your files in your Assets folder.

Right-click in your Project window and select Create > Material

This will create a new material, which you can name.

This name can include spaces.

I named this "Blue Materia." (Yes, that was an accident and I didn't feel like changing it for this page.)

Step 2: Modify a Material

Once selected, the properties of the material will appear in the Inspector window:

Here, you can change different aspects of the material. We'll just change the color here by clicking on the white square next to "Albedo."

Click first on the Hue (color) in the circle, then on the square to choose your Saturation (intensity) and Value (brightness) of that color.

Hit the ENTER key or close the color wheel popup. This will update the material.

Step 3: Adding a Material to an Object

Unity's best feature is its click-and-drag capability. To add your material to an object in your scene, click and drag your material from your Project window to the object in your Scene window OR Hierarchy window.

When it has been added, not only will you be able to see it update in the Scene window, but you can also see the Material component update at the bottom of the Inspector window.

Remember: When you update the properties of an asset in the Project window, it updates it for ALL objects the asset is added to.

https://hopemoore.gitbook.io/unity-basics/translate-rotate-and-scale/intro-to-transforms
Located at the top left - Move button is selected here.
Located at the top left - Rotate button is selected here.
Located at the top left - Scale button is selected here.
Inspector window for an example cube.
The component appears at the bottom of the list of attached components.
Example of a type of blue.