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
Unity 3D Game Development

You're reading from   Unity 3D Game Development Designed for passionate game developers—Engineered to build professional games

Arrow left icon
Product type Paperback
Published in Aug 2022
Publisher Packt
ISBN-13 9781801076142
Length 370 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Authors (4):
Arrow left icon
Anthony Davis Anthony Davis
Author Profile Icon Anthony Davis
Anthony Davis
Ryan Stunkel Ryan Stunkel
Author Profile Icon Ryan Stunkel
Ryan Stunkel
Russell Craig Russell Craig
Author Profile Icon Russell Craig
Russell Craig
Travis Baptiste Travis Baptiste
Author Profile Icon Travis Baptiste
Travis Baptiste
Arrow right icon
View More author details
Toc

The Rigidbody component

This powerful physics-focused component can be added to GameObjects to determine its position through physics. By default, just adding this component to a GameObject will put its motion under the influence of gravity. To understand how Unity uses physics, let’s take some time to look at the component.

Figure 7.1 is a screenshot of the Rigidbody in Unity. There is a Rigidbody 2D component. Do not use this component for a 3D application. The primary problem with this is that the 2D and 3D versions of the physics steps do not interact with each other. It’s best to choose one and stick with it! We will go through all the pieces to the Rigidbody component after the figure.

A screenshot of a computer  Description automatically generated with medium confidence

Figure 7.1: Rigidbody component

Mass

The Mass property of the Rigidbody refers to that object’s relationship to other object’s masses. This will not make gravity affect it differently, but it will affect collisions with other objects. For example...

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