Physics
Understand the options for adding physics simulations to your application.
Read time 1 minuteLast updated 4 days ago
Unity helps you simulate physics in your Project to ensure that the objects correctly accelerate and respond to collisions, gravity, and various other forces. Unity provides different physics engine implementations which you can use according to your Project needs: 3D, 2D, object-oriented, or data-oriented. This page provides the links to their documentation.
You can create some basic physics interactions with the user interface, but for more control over the simulation, you need some familiarity with C#. To develop your C# skills, refer to the Unity Learn Junior Programmer course.
Built-in physics engines for object-oriented projects
If your project is object-oriented, use the Unity's built-in physics engine that corresponds to your needs:
- Built-in 3D physics: A Nvidia PhysX engine integration.
- Built-in 2D physics: A Box2D engine integration.
Physics engine packages for data-oriented projects
If your project uses Unity's Data-Oriented Technology Stack (DOTS), you need to install a dedicated DOTS physics package. The available packages are:
- Unity Physics package: the DOTS physics engine you need to install by default to simulate physics in any data-oriented project.
- Havok Physics for Unity package: an implementation of the Havok physics engine for Unity, to use as an extension of the Unity Physics package. Note that this package is subject to a specific licensing scheme.
Additional resources and examples
- 💡 Resources:Physics tutorials
- 📺 Video:Performance optimization tips: Physics in Unity
- 👥 Community:Join the conversation on Unity Discussions