Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Game Development with Unity for .NET Developers

You're reading from   Game Development with Unity for .NET Developers The ultimate guide to creating games with Unity and Microsoft Game Stack

Arrow left icon
Product type Paperback
Published in May 2022
Publisher Packt
ISBN-13 9781801078078
Length 584 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Jiadong Chen Jiadong Chen
Author Profile Icon Jiadong Chen
Jiadong Chen
Arrow right icon
View More author details
Toc

Table of Contents (16) Chapters Close

Preface 1. Part 1: Basic Unity Concepts
2. Chapter 1: Hello Unity FREE CHAPTER 3. Chapter 2: Scripting Concepts in Unity 4. Part 2: Using C# Scripts to Work with Unity's Built-In Modules
5. Chapter 3: Developing UI with the Unity UI System 6. Chapter 4: Creating Animations with the Unity Animation System 7. Chapter 5: Working with the Unity Physics System 8. Chapter 6: Integrating Audio and Video in a Unity Project 9. Part 3: Advanced Scripting in Unity
10. Chapter 7: Understanding the Mathematics of Computer Graphics in Unity 11. Chapter 8: The Scriptable Render Pipeline in Unity 12. Chapter 9: The Data-Oriented Technology Stack in Unity 13. Chapter 10: Serialization System and Assets Management in Unity and Azure 14. Chapter 11: Working with Microsoft Game Dev, Azure Cloud, PlayFab, and Unity 15. Other Books You May Enjoy

Creating a simple game based on the Physics system

We have learned the concepts of Unity's Physics system and discussed how to use C# code to interact with the Physics system. Next, we will use the knowledge we have learned to create a simple physics-based ping-pong game in Unity.

First, let's perform the following steps to create a Plane object as a ping-pong table:

  1. Right-click on the Hierarchy window to open the menu.
  2. Select 3D Object > Plane to create a new Plane object in the editor.

Figure 5.18 – Creating a Plane object

  1. Rename the Plane object to Table.
  2. Select Table to open its Inspector window, modify the Z value of Scale to 2, and we can see that a Mesh Collider has been added to this object by default.

Figure 5.19 – The Inspector window of "Table"

  1. Let's create four Cube objects as walls on the table by selecting 3D Object > Cube, which...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime