Physics

Other than programmed animations, Unity objects can be set up to move and interact on their own, using physics properties. When an object is assigned a Rigid Body, it can have Mass and Drag (resistance), and respond to Gravity. Once set in motion, Unity's physics engine will automatically calculate the object's next move and update it with each frame.

Separately, objects can be given a Collider mesh that defines the shape and bounds of itself used to calculate if and when the objects hit other objects. This may be as simple as a table standing steadfast on the floor (gravity), or a projectile in flight hitting its target. Objects can also be given a Physic Material that defines how it responds, such as landing like a brick or bouncing like a ball.

Furthermore, you can program how your Unity project responds to collision events, and then initiate other effects, animations, sounds, and so on. So when a projectile hits its target, you can play awesome Audio sounds, show amazing Particle effects and control other objects that are used in the application. We'll get to play with some of these features in the projects in this book.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
13.58.121.131