A Brief Introduction to Physics in Unity

Andrew Crippen
2 min readApr 16, 2021

--

Box Collider set to Is Trigger

Unity has built in physics engines for 3D and 2D which allow you to simulate physics for gravity, collisions and other various forces.

At the very most basic level to get physics working you need colliders on your objects and at least one needs a Rigidbody component.

The Rigidbody is the main component that enables physical behavior for a gameobject.

With a Rigidbody attached, the object will immediately respond to gravity unless the Use Gravity box is unchecked.

If the gameobject also has a collider it will be moved when colliding with other gameobjects unless the Is Trigger box is checked on the collider component. In the very top gif is an example of the behavior when Is Trigger is enabled.

Below is an example of both gameobjects having a Rigidbody with Use Gravity disabled and colliders with Is Trigger not enabled.

A much more in-depth explanation of Physics in Unity can be found in the Unity Manual here https://docs.unity3d.com/Manual/PhysicsSection.html

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

Andrew Crippen
Andrew Crippen

Written by Andrew Crippen

Unity Developer/C# Programmer for VR, 2d,3d Games and other Immersive Interactive Experiences

No responses yet

Write a response