[C# Scripting] Part 0: Getting Started

Step 1
In this course, we'll learn the rest of Unity and becoming a Unity Master! You'll learn how Modern games work.

Note: I will be using Unity 2017.4.28.f1 for this Tutorial.

You will learn how to control the amazing visuals that Unity has to offer!

We'll learn how to put all that we learned together while learning new things to make things look fantastic!

Step 2

It will be difficult ahead, so you should be familiar with JavaScript, Blender and Unity.

If not I would recommend completing our other Unity/Blender courses:

  • Unity - Super Roll a ball
  • Unity - Basics
  • Unity - Intermediate
  • Unity - RPG (up until at least Camera Controller)
  • Blender - Basics
  • Blender - Intermediate
  • JavaScript for Scratchers Lesson 2 on fill() function (very important)
Step 3
To get started, if you have a Super Roll a Ball project, you can load that with a new scene.

**If you don't have a Super Roll a ball Project with you, you can create a new project with a plane and a sphere in the middle. **

Also attach this script from Super Roll a ball to your sphere.

Download PlayerController.cs
Check Your Work
Step 4
If you press play you should have a moving ball.
Step 5
You notice we don't have a moving camera with the ball. Next we'll give it a camera.

Instead of a static non rotating camera from Super Roll a Ball, we'll use a 3rd person dynamic Camera from MVCode's RPG Camera Controller Lesson!

If you don't know how a 3rd person camera works from the RPG lesson, I would recommend taking a look before moving on


If you already know how it works, please download this and add it to your project.

Download CameraController.cs
Step 6
[Optional Challenge] Combining the Player Controller and Camera Controller Script

If you didn't download the previous scripts from the above steps:
PlayerController.cs [From Super Roll a ball]
CameraController.cs [From Unity RPG]

and decided to try to combine those two scripts by yourself. Then this is a 2 Part 150 points challenge!

[100pts] Part 1: Combine PlayerController.cs and CameraControler.cs

When you try to combine these two, you want to:
- Have the camera move around your moving sphere
- Have the ball moving in the forward direction that your camera is facing.

[50pts] Part 2: Google how to do mouse scrolling to zoom in and out in Unity

To further make it look better you want to find a way to have your CameraController.cs be able to use the mouse wheel to scroll in and out of your player.

Check Your Work
Step 7
Let's check the camera controls on your ball

*Note: * If the camera is too high and not centered onto your ball, you need to set the Camera height in your Camera controller to 0f.
Or if you have the original camera controller script, you want to get rid of the "Vector3.up + 3.5f" when the transform.position is updated.

Step 8
You are now done setting up! Let's continue on to Part 1 on setting HD Textures!
[C# Scripting] Part 0: Getting Started Info



Created By

tina nguyen


Epic Roll a Ball

Access Level


For Teachers and Schools

Teach coding to your students with MVCode Teach

MVCode offers an integrated product designed to teach coding to students.

Learn more about MVCode Teach