Physics Debug Visualiser allows you to quickly inspect the ColliderAn invisible shape that is used to handle physical collisions for an object. A collider doesn’t need to be exactly the same shape as the object’s mesh - a rough approximation is often more efficient and indistinguishable in gameplay. More info
See in Glossary geometry in your SceneA Scene contains the environments and menus of your game. Think of each unique Scene file as a unique level. In each Scene, you place your environments, obstacles, and decorations, essentially designing and building your game in pieces. More info
See in Glossary, and profile common physics-based scenarios. It provides a visualisation of which GameObjectsThe fundamental object in Unity scenes, which can represent characters, props, scenery, cameras, waypoints, and more. A GameObject’s functionality is defined by the Components attached to it. More info
See in Glossary should and should not collide with each other. This is particularly useful when there are many Colliders in your Scene, or if the Render and Collision Meshes are out of sync.
For further guidance on improving physics performance in your project, see documentation on the Physics Profiler.
To open the Physics Debug window in the Unity Editor, go to Window > Analysis > Physics Debugger.
From this window, you can customize visual settings and specify the types of GameObjects you want to see or hide in the visualizer.
Hide Selected Items is the default mode. This means that every item appears in the visualizer, and you need to tick the checkbox for each item to hide it. To change this to Show Selected Items, use the drop-down at the top of the window. This means that no items appear in the visualizer, and you need to tick the checkbox for each item to display it.
Property | Function |
---|---|
Reset | Click this button to reset the Physics Debug window back to default settings. |
Hide Layers | Use the dropdown menu to determine whether or not to display Colliders from the selected LayersLayers in Unity can be used to selectively opt groups of GameObjects in or out of certain processes or calculations. This includes camera rendering, lighting, physics collisions, or custom calculations in your own code. More info See in Glossary. |
Hide Static Colliders | Tick this checkbox to remove static Colliders (Colliders with no Rigidbody component) from the visualization. |
Hide Triggers | Tick this checkbox to remove Colliders that are also Triggers from the visualization. |
Hide Rigidbodies | Tick this checkbox to remove Rigidbody components from the visualization. |
Hide Kinematic Bodies | Tick this checkbox to remove Colliders with Kinematic Rigidbody components (which are not controlled by the physics engine) from the visualization. See documentation on Rigidbody components for more details. |
Hide Sleeping Bodies | Tick this checkbox to remove Colliders with Sleeping RigidbodyA component that allows a GameObject to be affected by simulated gravity and other forces. More info See in Glossary components (which are not currently engaging with the physics engine) from the visualization. See documentation on Rigidbody components: Sleeping for more details. |
Collider Types | Use these options to remove specific Collider types from the physics visualization. |
Hide BoxColliders |
Tick this checkbox to remove Box CollidersA cube-shaped collider component that handles collisions for GameObjects like dice and ice cubes. More info See in Glossary from the visualization. |
Hide SphereColliders |
Tick this checkbox to remove Sphere CollidersA sphere-shaped collider component that handles collisions for GameObjects like balls or other things that can be roughly approximated as a sphere for the purposes of physics. More info See in Glossary from the visualization. |
Hide CapsuleColliders |
Tick this checkbox to remove Capsule CollidersA capsule-shaped collider component that handles collisions for GameObjects like barrels and character limbs. More info See in Glossary from the visualization. |
Hide MeshColliders (convex) |
Tick this checkbox to remove convex Mesh CollidersA free-form collider component which accepts a mesh reference to define its collision surface shape. More info See in Glossary from the visualization. |
Hide MeshColliders (concave) |
Tick this checkbox to remove concave Mesh Colliders from the visualization. |
Hide TerrainColliders |
Tick this checkbox to remove Terrain CollidersA terrain-shaped collider component that handles collisions for collision surface with the same shape as the Terrain object it is attached to. More info See in Glossary from the visualization. |
Hide None | Click Hide None to clear all filtering criteria and display all Collider types in the visualization. |
Hide All | Click Hide All to enable all filters and remove all Collider types from the visualization. |
Colors | Use these settings to define how Unity displays physics components in the visualization. |
Static Colliders |
Use this color selector to define which color indicates static Colliders (Colliders with no Rigidbody component) in the visualization. |
Triggers | Use this color selector to define which color indicates Colliders that are also Triggers in the visualization. |
Rigidbodies | Use this color selector to define which color indicates Rigidbody components in the visualization. |
Kinematic Bodies |
Use this color selector to define which color indicates Kinematic Rigidbody components (which are not controlled by the physics engine) from the visualization. See documentation on Rigidbody components for more details. |
Sleeping Bodies |
Use this color selector to define which color indicates Sleeping Rigidbody components (which are not currently engaging with the physics engine) from the visualization. See documentation on Rigidbody components: Sleeping for more details. |
Variation | Use the slider to set a value between 0 and 1. This defines how much of your chose color blends with a random color. Use this to visually separate Colliders by color, and to see the structure of the GameObjects. |
Rendering | Use these settings to define how Unity renders and displays the physics visualization. |
Transparency | Use the slider to set the value between 0 and 1. This defines the transparency of drawn collisionA collision occurs when the physics engine detects that the colliders of two GameObjects make contact or overlap, when at least one has a Rigidbody component and is in motion. More info See in Glossary geometry in the visualization. |
Force Overdraw |
Normal render geometry can sometimes obscure Colliders (for example, a Mesh Collider plane underneath a floor).Tick the Force Overdraw checkbox to make the visualization renderer draw Collider geometry on top of render geometry. |
View Distance |
Use this to set the view distance of the visualization. |
Terrain Tiles Max |
Use this to set the maximum number of Terrain tiles in the visualization. |
The overlay panel has further options:
Property | Function |
---|---|
Collision Geometry | Tick this checkbox to enable collision geometry visualization. |
Mouse Select | Tick this checkbox to enable mouse-over highlighting and mouse selection. This can be useful if you have large GameObjects obstructing each other in the visualizer. |
You can use Physics Debug to profile and troubleshoot physics activity in your game. You can customize which types of Colliders or Rigidbody components you can see in the visualiser, to help you find the source of activity. The two most helpful are:
To see active Rigidbody components only: To see only the Rigidbody components that are active and therefore using CPU/GPU resources, tick Hide Static Colliders and Hide Sleeping Bodies.
To see non-convex MeshThe main graphics primitive of Unity. Meshes make up a large part of your 3D worlds. Unity supports triangulated or Quadrangulated polygon meshes. Nurbs, Nurms, Subdiv surfaces must be converted to polygons. More info
See in Glossary
Colliders only: Non-convex (triangle-based) Mesh Colliders tend to generate the most contacts when their attached Rigidbody components are very near a collision with another Rigidbody or Collider. To visualize only the non-convex Mesh Colliders, set the window to Show Selected Items mode, click the Select None button, then tick the Show MeshColliders (concave) checkbox.
See Unity Scripting API Reference for:
2017–06–01 Page amended
Physics Debug Visualization is a new feature in Unity 5.6
When you visit any website, it may store or retrieve information on your browser, mostly in the form of cookies. This information might be about you, your preferences or your device and is mostly used to make the site work as you expect it to. The information does not usually directly identify you, but it can give you a more personalized web experience. Because we respect your right to privacy, you can choose not to allow some types of cookies. Click on the different category headings to find out more and change our default settings. However, blocking some types of cookies may impact your experience of the site and the services we are able to offer.
More information
These cookies enable the website to provide enhanced functionality and personalisation. They may be set by us or by third party providers whose services we have added to our pages. If you do not allow these cookies then some or all of these services may not function properly.
These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us to know which pages are the most and least popular and see how visitors move around the site. All information these cookies collect is aggregated and therefore anonymous. If you do not allow these cookies we will not know when you have visited our site, and will not be able to monitor its performance.
These cookies may be set through our site by our advertising partners. They may be used by those companies to build a profile of your interests and show you relevant adverts on other sites. They do not store directly personal information, but are based on uniquely identifying your browser and internet device. If you do not allow these cookies, you will experience less targeted advertising. Some 3rd party video providers do not allow video views without targeting cookies. If you are experiencing difficulty viewing a video, you will need to set your cookie preferences for targeting to yes if you wish to view videos from these providers. Unity does not control this.
These cookies are necessary for the website to function and cannot be switched off in our systems. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms. You can set your browser to block or alert you about these cookies, but some parts of the site will not then work. These cookies do not store any personally identifiable information.