SlideShare a Scribd company logo
Based on Roll-a-ball video tutorial from Unity Technologies
Part 1
@shahedC
WakeUpAndCode.com
Getting Started
> Creating the Ground
> Creating the Player
> Materials, Colors & Lighting
> 3D Physics & Movement
Controlling the Camera
Rollerball: 1 of 2
Rollerball: 1 of 2
Rollerball: 1 of 2
Select 3D (not 2D) Click [Create project]
Click Layout
dropdown
to select
or save
Click
File 
Save Scene
Create
New folder
below
Assets
folder
Name it
“Scenes”
, then click [Save]… Name your scene “PlayingField.unity”
Inside
“Scenes”
Subfolder…
Verify
Saved Scene
in
Project panel
Verify Scene Name in Title Bar
Rollerball: 1 of 2
Click GameObject  3D Object  Plane Click Create  3D Object  Plane
In the top menu… In the Hierarchy panel…- OR -
Rollerball: 1 of 2
Right-click to rename
Enter “Ground”
Select
“Ground”
in Hierarchy
Click gear icon
next to
Transform
then
click “Reset”
Rollerball: 1 of 2
With “Ground” selected in hierarchy…
… press ‘F’ on your keyboard to focus on it
… move your cursor to the Scene
Scroll the mouse wheel over your scene to zoom in/out
In the Scene panel, click the Gizmos dropdown to toggle “Show Grid”
Click on the Scale tool, while the Ground is selected…
… then, drag the handles to resize the ground
Manually enter Scale values in the Ground’s Transform component
Scale: X = 2, Y = 1, Z = 2
Rollerball: 1 of 2
Click GameObject  3D Object  Sphere Click Create  3D Object  Sphere
In the top menu… In the Hierarchy panel…- OR -
Position Sphere at X = 0, Y = 0.5, Z = 0
Rollerball: 1 of 2
Rollerball: 1 of 2
In the Project panel,
click Create dropdown
then, select “Folder”
In Project panel,
click Create
then, select “Folder”
Rename it “Materials”
In Project panel,
click Create
then, select
“Material”
Rename it “GroundMaterial”
Repeat for “BallMaterial”
For each
material...
Update color
in Inspector
window
(click white
square)
• Red
• Green
• Blue
• Alpha (Transparency)
Verify that GroundMaterial and BallMaterial have different colors.
Drag each material from Project panel to the Scene panel
Update Direction Light in Inspector
Rotation: X = 50, Y = 60, Z = 0
Rollerball: 1 of 2
With “Ball” selected in the Hierarchy panel…
Click Component  Physics  RigidBody
With “Ball” selected in the Hierarchy panel, click Add Component  Physics  Rigidbody
Verify RigidBody Component
In the Project panel,
click Create dropdown
Then select “Folder”, name it “Scripts”
In the Project panel,
click Create dropdown Then select “C# Script”, name it
PlayerController
With “Ball”
selected...
… Drag
script into
Ball
Verify Script
Component!
Rollerball: 1 of 2
Add FixedUpdate() method
… just before last curly brace
Inside FixedUpdate() method…
Calculate 3D movement
Define rb
just before Start()
Initialize inside
Start() method
Add Force inside
FixedUpdate()
Click Play button, move around with arrow keys!
Define public
speed variable
Multiply speed
with movement
With “Ball”
selected...
Set Speed = 10
Click Play button, move around with arrow keys!
Rollerball: 1 of 2
Set Camera Position and Rotation
• Position: X = 0, Y = 10, Z = -10
• Rotation: X = 45, Y = 0, Z = 0
Camera should
appear higher
with a better view
In the Project panel,
click Create dropdown Then select “C# Script”, name it
CameraController
Rollerball: 1 of 2
Define instance
variables
just before Start()
Initialize offset
in Start() method
Add
LateUpdate()
method
Then, set
camera
position
With
“Main Camera”
selected...
… Drag
script into
camera
Verify Script
Component!
With
“Main
Camera”
selected...
… Drag Ball into Camera’s Player object
Click Play, move around!
Rollerball: 1 of 2

More Related Content

PPTX
Rollerball: 2 of 2
PPTX
Unity 5: First-Person Tutorial
PPTX
Ninja Cat Flyer - 4 of 6
PPT
Interactive ppt
PPTX
32 Killer PhotoShop Tips & Tricks that Make You an Expert.
PPTX
NewTek Lightwave 3D: Modeler II
PPTX
88 brilliant little tips for Photoshop
PPTX
Indesign
Rollerball: 2 of 2
Unity 5: First-Person Tutorial
Ninja Cat Flyer - 4 of 6
Interactive ppt
32 Killer PhotoShop Tips & Tricks that Make You an Expert.
NewTek Lightwave 3D: Modeler II
88 brilliant little tips for Photoshop
Indesign

What's hot (14)

PPTX
NewTek Lightwave 3D: Working in 3D Space
PDF
Let's make a game unity
PDF
PDF
Aobe photoshop cs5 keyboard shortcut
PDF
Flash Tutorial
PPTX
PPT
Rolling The Dice
PDF
Digital logooriginal
PPSX
COMPUTER Tips ‘n’ Tricks
PPTX
Adobe After Effects
PPTX
Create Flashcards
PPTX
Make beliefs comix tutorial
DOCX
Lesson03
PDF
What dose what
NewTek Lightwave 3D: Working in 3D Space
Let's make a game unity
Aobe photoshop cs5 keyboard shortcut
Flash Tutorial
Rolling The Dice
Digital logooriginal
COMPUTER Tips ‘n’ Tricks
Adobe After Effects
Create Flashcards
Make beliefs comix tutorial
Lesson03
What dose what
Ad

Similar to Rollerball: 1 of 2 (20)

PPTX
Ninja Cat Flyer - 1 of 6
PPTX
Ninja Cat Flyer - 3 of 6
PPTX
Building your first game in Unity 3d by Sarah Sexton
PPTX
Introduction to Unity3D and Building your First Game
PDF
HoloLens Programming Tutorial: AirTap & Spatial Mapping
PPTX
WP7 HUB_XNA overview
PPTX
WP7 HUB_XNA
PPTX
Intro to Construct 2: Ghost Shooter - Step by Step
PDF
STEM Camp Virtual Reality
PPTX
Workingwithunity 110519054824-phpapp01
PDF
ITS488 Lecture 4: Google VR Cardboard Game Development: Basket Ball Game #2
PDF
Lecture 4: ITS488 Digital Content Creation with Unity - Game and VR Programming
PDF
Mobile AR Lecture6 - Introduction to Unity 3D
PPTX
Unity - Create a structure with primitives
PDF
How tomakea gameinunity3d
PDF
Fps tutorial 1
PDF
The Ring programming language version 1.5.3 book - Part 48 of 184
PDF
The Ring programming language version 1.5.3 book - Part 58 of 184
PPTX
ANM3D-UWG-2020-12.pptx
PDF
Lecture2_practice.pdf
Ninja Cat Flyer - 1 of 6
Ninja Cat Flyer - 3 of 6
Building your first game in Unity 3d by Sarah Sexton
Introduction to Unity3D and Building your First Game
HoloLens Programming Tutorial: AirTap & Spatial Mapping
WP7 HUB_XNA overview
WP7 HUB_XNA
Intro to Construct 2: Ghost Shooter - Step by Step
STEM Camp Virtual Reality
Workingwithunity 110519054824-phpapp01
ITS488 Lecture 4: Google VR Cardboard Game Development: Basket Ball Game #2
Lecture 4: ITS488 Digital Content Creation with Unity - Game and VR Programming
Mobile AR Lecture6 - Introduction to Unity 3D
Unity - Create a structure with primitives
How tomakea gameinunity3d
Fps tutorial 1
The Ring programming language version 1.5.3 book - Part 48 of 184
The Ring programming language version 1.5.3 book - Part 58 of 184
ANM3D-UWG-2020-12.pptx
Lecture2_practice.pdf
Ad

More from Shahed Chowdhuri (20)

PPTX
ASP.NET Core 2.1: The Future of Web Apps
PPTX
ASP.NET Core 2.1: The Future of Web Apps
PPTX
Cloud-Backed Mixed Reality: HoloLens & Azure Cognitive Services
PPTX
ASP.NET Core 2.1: The Future of Web Apps
PPTX
Cloud-Backed Mixed Reality with HoloLens & Azure Cognitive Services
PPTX
Microsoft Cognitive Services
PPTX
Intro to Bot Framework v3 with DB
PPTX
Game On with Windows & Xbox One @ .NET Conf UY
PPTX
Game On with Windows & Xbox One!
PPTX
Going Serverless with Azure Functions
PPTX
ASP.NET Core 2.0: The Future of Web Apps
PPTX
Azure for Hackathons
PPTX
Intro to Xamarin: Cross-Platform Mobile Application Development
PPTX
Xbox One Dev Mode
PPTX
What's New at Microsoft?
PPTX
Capture the Cloud with Azure
PPTX
Intro to HoloLens Development + Windows Mixed Reality
PPTX
Intro to Bot Framework v3
PPTX
Azure: PaaS or IaaS
PPTX
ASP.NET Core MVC + Web API with Overview
ASP.NET Core 2.1: The Future of Web Apps
ASP.NET Core 2.1: The Future of Web Apps
Cloud-Backed Mixed Reality: HoloLens & Azure Cognitive Services
ASP.NET Core 2.1: The Future of Web Apps
Cloud-Backed Mixed Reality with HoloLens & Azure Cognitive Services
Microsoft Cognitive Services
Intro to Bot Framework v3 with DB
Game On with Windows & Xbox One @ .NET Conf UY
Game On with Windows & Xbox One!
Going Serverless with Azure Functions
ASP.NET Core 2.0: The Future of Web Apps
Azure for Hackathons
Intro to Xamarin: Cross-Platform Mobile Application Development
Xbox One Dev Mode
What's New at Microsoft?
Capture the Cloud with Azure
Intro to HoloLens Development + Windows Mixed Reality
Intro to Bot Framework v3
Azure: PaaS or IaaS
ASP.NET Core MVC + Web API with Overview

Recently uploaded (20)

PPTX
A Presentation on Artificial Intelligence
PPT
Teaching material agriculture food technology
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Getting Started with Data Integration: FME Form 101
PPTX
MYSQL Presentation for SQL database connectivity
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PPTX
Spectroscopy.pptx food analysis technology
PDF
cuic standard and advanced reporting.pdf
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PPTX
1. Introduction to Computer Programming.pptx
A Presentation on Artificial Intelligence
Teaching material agriculture food technology
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Getting Started with Data Integration: FME Form 101
MYSQL Presentation for SQL database connectivity
“AI and Expert System Decision Support & Business Intelligence Systems”
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Mobile App Security Testing_ A Comprehensive Guide.pdf
Dropbox Q2 2025 Financial Results & Investor Presentation
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
The Rise and Fall of 3GPP – Time for a Sabbatical?
20250228 LYD VKU AI Blended-Learning.pptx
Spectroscopy.pptx food analysis technology
cuic standard and advanced reporting.pdf
Building Integrated photovoltaic BIPV_UPV.pdf
Reach Out and Touch Someone: Haptics and Empathic Computing
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
1. Introduction to Computer Programming.pptx

Rollerball: 1 of 2

Editor's Notes

  • #2: Title Page: Game Development with Unity 5 and C# Windows  Web  Xbox  Mobile  … and more! By Shahed Chowdhuri Technical Evangelist Blog: WakeUpAndCode.com Twitter: @shahedC
  • #3: Agenda