Unity — Physics

Samuel Asher Rivello
3 min readFeb 16, 2023

--

Unity is a powerful suite of tools (Project IDE, Code IDE, run-time) for game development.

Many features and services are provided within Unity, including a full Physics system. You can simulate game Physics in your Unity project to ensure proper collision detection, collision resolution, and spatial queries.

I created a complete Udemy course and full downloadable sample project for you to learn the benefits of Unity Physics.

New Course — Now Available!

QUALITIES OF PHYSICS:

• Collision Detection — Simulation captures before two objects overlap

• Collision Resolution— Simulation moves objects to prevent overlap

• Spatial Query— API answers “Will bullet hit character next frame?”

ABOUT THE AUTHOR

I am a Unity Game & Tools Developer with over 20 years of game development experience. I am available for hire (Remote, Contract).

SamuelAsherRivello.com

2D Physics

Unity’s Physics system lets you handle 2D Physics to make use of optimizations available with 2D.

Features

  • Rigidbody 2D — Places an object under the control of the Physics engine
  • Collider 2D — Defines the shape of a 2D GameObject for the purposes of physical collisions
  • Joints 2D — Attach GameObjects together
  • And more…

3D Physics

Unity’s built-in 3D Physics engine simulates aspects of physical systems so that objects can accelerate correctly and be affected by collisions, gravity and other forces.

Features

  • CharacterController 3D — Collision-based Physics for player’s avatar, so that it doesn’t fall through the floor or walk through walls
  • Ragdoll 3D — Set of colliders, rigid bodies and joints, that you can apply to a humanoid character, to simulate behaviour such as impact collisions and character death
  • Cloth 3D — Provides a Physics-based solution for simulating fabrics
  • And more…

C# Physics

The Unity Engine provides a full C# programming Physics properties and methods.

Features

  • Collision Detection — Simulation captures before two objects overlap
  • Collision Resolution — Simulation moves objects to prevent overlap
  • Spatial Query — API answers “Will bullet hit character next frame?”
  • And more…

Samples

Sample projects are a great way to learn. See demonstrations of specific features created using best practices.

Two complete sample game projects are included in the Physics For Unity course on Udemy.

Angry Birds (Clone)

A complete 2D Unity Physics game. Master the Physics tricks used by the world-famous game for Console, PC, & Mobile. Build the project from scratch with Unity 2D Components.

Angry Birds 2D (Clone)

Marble Madness (Clone)

A complete 3D Unity Physics game. Learn from a game that started the Physics revolution. Create this arcade classic in Unity with C# Physics

Marble Madness 3D (Clone)

New Course — Now Available!

More By Samuel Asher Rivello

Available For Unity Hire: Remote, Contract

Over 20 years of game development experience. SamuelAsherRivello.com

Comments?

Let me know! Twitter.com/srivello

--

--

Samuel Asher Rivello

Game Developer & Instructor - Unity Certified. 20+ years of game dev XP. Available: Remote, Contract. http://www.SamuelAsherRivello.com