โ† Game Development with Unity learning path
Game Development with Unity ยท Module 5 of 10

Physics and collisions

Simulate gravity, collisions and triggers.

๐Ÿ“– Key ideas

  1. Rigidbody adds physics (gravity, mass, forces).
  2. Colliders define collision shapes: Box, Sphere, Capsule, Mesh.
  3. OnCollisionEnter detects hits; OnTriggerEnter detects entering trigger zones.
  4. Physics materials control bounce and friction.
  5. 2D games use Rigidbody2D and Collider2D.
๐Ÿ’ก Real-life example: Colliders are invisible bubble wrap around objects; Rigidbody is the gravity that makes them fall.
RigidbodyAdds physics simulation
ColliderCollision shape
TriggerCollider detecting overlap without physics push
Physics materialFriction and bounciness settings