Summary - Physics
- Game Development course
- Beginner
- Lesson 54/83
- 4 min
Reinforce physics concepts with a summary task.
Summary: Physics System
In this module, you learned the core pillars of Unity's physics simulation. Rigidbody grants gravity, mass, and accelerated forces, while Collider types outline contact boundaries.
// Physics system summary:
// Rigidbody -> Mass, gravity, and AddForce
// Solid contact -> OnCollisionEnter
// Pass-through zone -> Is Trigger and OnTriggerEnterSolid interactions are governed via the OnCollision cycle, while detection zones are managed using Is Trigger and OnTrigger callbacks.
Practice Print complete physics profile
To summarize an object's physics profile, define body ("Rigidbody"), shape ("BoxCollider"), and state ("Solid"). Print Physics: Rigidbody | Shape: BoxCollider | Mode: Solid to the console.
Starter code
using System;
class Program
{
static void Main()
{
// Fizik özet bilgilerini tanımlayıp yazdır
}
}Sample solution
using System;
class Program
{
static void Main()
{
string body = "Rigidbody";
string shape = "BoxCollider";
string state = "Solid";
Console.WriteLine("Physics: " + body + " | Shape: " + shape + " | Mode: " + state);
}
}Expected output
Physics: Rigidbody | Shape: BoxCollider | Mode: Solid
Questions and answers
Review the lesson questions together with their answers. To test yourself, solve the lesson interactively.
1 Under which circumstance is OnTriggerEnter triggered instead of OnCollisionEnter?
- When an upward force is applied to the object using AddForce
- When the object's name is modified in the Hierarchy panel
- When the Is Trigger checkbox is enabled on the Collider component Correct answer
- When the GameObject is completely destroyed and removed from scene
Explanation: When Is Trigger is enabled, the object stops solid collision and fires OnTrigger events instead of OnCollision.
2 Complete trigger enter method
void ____(Collider other)
void OnTriggerEnter(Collider other)
Explanation: The trigger enter callback method accepting a Collider reference is OnTriggerEnter.
3 Physics concepts summary
| Term | Meaning |
|---|---|
Rigidbody |
Simulates mass & gravity — component |
BoxCollider |
Defines cubic collision bounds |
AddForce |
Gives object accelerated motion |
Is Trigger |
Disables collision, enables zone detect |