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
Hands-On Unity 2020 Game Development

You're reading from   Hands-On Unity 2020 Game Development Build, customize, and optimize professional games using Unity 2020 and C#

Arrow left icon
Product type Paperback
Published in Jul 2020
Publisher Packt
ISBN-13 9781838642006
Length 580 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Nicolas Alejandro Borromeo Nicolas Alejandro Borromeo
Author Profile Icon Nicolas Alejandro Borromeo
Nicolas Alejandro Borromeo
Arrow right icon
View More author details
Toc

Table of Contents (24) Chapters Close

Preface 1. Chapter 1: Designing a Game from Scratch 2. Chapter 2: Setting Up Unity FREE CHAPTER 3. Chapter 3: Working with Scenes and GameObjects 4. Chapter 4: Grayboxing with Terrain and ProBuilder 5. Chapter 5: Importing and Integrating Assets 6. Chapter 6: Materials and Effects with URP and Shader Graph 7. Chapter 7: Visual Effects with Particle Systems and VFX Graph 8. Chapter 8: Lighting Using the Universal Render Pipeline 9. Chapter 9: Fullscreen Effects with postprocessing 10. Chapter 10: Sound and Music Integration 11. Chapter 11: User Interface Design 12. Chapter 12: Creating Animations with Animator, Cinemachine, and Timeline 13. Chapter 13: Introduction to Unity Scripting with C# 14. Chapter 14: Implementing Movement and Spawning 15. Chapter 15: Physics Collisions and Health System 16. Chapter 16: Win and Lose Conditions 17. Chapter 17: Scripting the UI, Sounds, and Graphics 18. Chapter 18: Implementing Game AI for Building Enemies 19. Chapter 19: Scene Performance Optimization 20. Chapter 20: Building the Project 21. Chapter 21: Finishing Touches 22. Chapter 22: Augmented Reality in Unity 23. Other Books You May Enjoy

Implementing movement

Almost every object in the game moves one way or another, the Player character with the keyboard, the Enemies through AI, the bullets simply move forward, and so on. There are several ways of moving objects in Unity, so we will start with the simplest one, that is, through the Transform component.

In this section, we will examine the following movement concepts:

  • Moving objects through Transform
  • Using Input
  • Understanding Delta Time

First, we will explore how to access the Transform component in our script to drive the Player movement, to later apply movement based on the Player's keyboard Input. Finally, we are going to explore the concept of Delta Time to make sure the movement speeds are consistent in every computer. We are going to start learning about the Transform API to master simple movement.

Moving objects through Transform

Transform is the component that holds the Translation, Rotation, and Scale of an object, so every...

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 $19.99/month. Cancel anytime