Learning C# by Developing Games with Unity 2021 by Harrison Ferrone
Author:Harrison Ferrone
Language: eng
Format: epub
Tags: COM051310 - COMPUTERS / Programming Languages / C#, COM012040 - COMPUTERS / Programming / Games, COM012000 - COMPUTERS / Computer Graphics
Publisher: Packt
Published: 2021-10-27T12:11:41+00:00
Figure 7.6: Rigidbody component in the Inspector pane
Collider components, which determine how and when GameObjects enter and exit each other's physical space or simply collide and bounce away. While there should only be one Rigidbody component attached to a given GameObject, there can be several Collider components if you need different shapes or interactions. This is commonly referred to as a compound Collider setup:
Figure 7.7: Box collider component in the Inspector pane
When two Collider components interact with each other, the Rigidbody properties determine the resulting interaction. For example, if one GameObject's mass is higher than the other, the lighter GameObject will bounce away with more force, just like in real life. These two components are responsible for all physical interactions and simulated movement in Unity.
There are some caveats to using these components, which are best understood in terms of the types of movement Unity allows:
Kinematic movement happens when a Rigidbody component is attached to a GameObject, but it doesn't register to the physics system in the scene. In other words, kinematic objects have physics interactions but don't react to them, like a wall in real life. This is only used in certain cases and can be enabled by checking the Is Kinematic property of a Rigidbody component. Since we want our capsule to interact with the physics system, we won't be using this kind of motion.
Non-kinematic movement is when a Rigidbody component is moved or rotated by applying force rather than manually changing a GameObject's Transform properties. Our goal for this section is to update the PlayerBehavior script to implement this type of motion.
Download
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Management Strategies for the Cloud Revolution: How Cloud Computing Is Transforming Business and Why You Can't Afford to Be Left Behind by Charles Babcock(4130)
Ego Is the Enemy by Ryan Holiday(3991)
Offensive Shellcode from Scratch by Rishalin Pillay(3663)
Exploring Deepfakes by Bryan Lyon and Matt Tora(3247)
Robo-Advisor with Python by Aki Ranin(3021)
Learning C# by Developing Games with Unity 2021 by Harrison Ferrone(2868)
Speed Up Your Python with Rust by Maxwell Flitton(2847)
Liar's Poker by Michael Lewis(2810)
Agile Security Operations by Hinne Hettema(2802)
Linux Command Line and Shell Scripting Techniques by Vedran Dakic and Jasmin Redzepagic(2801)
OPNsense Beginner to Professional by Julio Cesar Bueno de Camargo(2801)
Extreme DAX by Michiel Rozema & Henk Vlootman(2790)
Essential Cryptography for JavaScript Developers by Alessandro Segala(2738)
Elevating React Web Development with Gatsby by Samuel Larsen-Disney(2727)
AI-Powered Commerce by Andy Pandharikar & Frederik Bussler(2642)
Python for ArcGIS Pro by Silas Toms Bill Parker(2642)
Cryptography Algorithms by Massimo Bertaccini(2627)
Incident Response Techniques for Ransomware Attacks by Oleg Skulkin(2625)
Distributed .NET with Microsoft Orleans by Bhupesh Guptha Muthiyalu Suneel Kumar Kunani(2625)