Use the Physics Debug window to configure and generate visual representations of 3D physics activity in a 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. These visualizations appear in the Scene viewAn interactive view into the world you are creating. You use the Scene View to select and position scenery, characters, cameras, lights, and all other types of Game Object. More info
See in Glossary.
To open the Physics Debug window in the Unity Editor, go to Window > Analysis > Physics Debugger.
Physics Debugger inserts a Physics debug panel in the Scene view, and opens a Physics Debug window that contains the following tabs:
To revert the Physics Debug window back to its default settings, select Reset.
For more information on improving physics performance in your project, see documentation on the Physics Profiler.
Physics debug panelWhen the Physics Debug window is open in Unity, the Physics Debug panel appears in the Scene view. By default, it appears in the bottom-right corner of the Scene view; however, you can click and drag to move it around.
Property Description 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 infoThe Info tab contains data about any selected RigidbodyA component that allows a GameObject to be affected by simulated gravity and other forces. More info
See in Glossary or ArticulationBody GameObjects. You can use this data to monitor the physics bodyâs behavior. You cannot edit the property values in this tab. You can modify them via script, but it is not recommended; in most cases, you should apply forces via the physics system to change these values instead.
To keep a specific GameObject permanently docked in the Info tab, enable Lock for that GameObject. You can lock an infinite number of GameObjects. Use the Number of items per row property to arrange the Info tab in a way that is easiest for you to navigate.
The Info tab always displays the following properties.
Property Description Number of items per row Define how many selected GameObjects to display horizontally in the top row of the Info tab.By default, if you select or lock multiple GameObjects, Unity displays them all vertically. However, you can arrange them horizontally instead. Use Number of items per row to define how many GameObjects to display next to each other on one horizontal row, up to a maximum of 10.
If the number of selected or locked GameObjects exceeds this number, the more recently selected GameObjects appear on a new row underneath the first.
GameObjects always appear in the Info tab in the order of selection. The default value for this property is 1.
Tracked objects Displays the total number of unique GameObjects that currently appear in the Info tab. This includes selected GameObjects and locked GameObjects. It does not include duplicates. Clear locked objects Select Clear locked objects to disable Lock for all GameObjects. This removes any GameObjects from the Info tab that are not already selected in the Hierarchy window.The Info tab displays the following properties when you select a GameObject in the Hierarchy that has a physics body (that is, a Rigidbody or an ArticulationBody).
Property Description GameObject Displays the name of the selected or locked GameObject that the following properties refer to. Draw Gizmos for Select which physics property the Physics Debug should display a gizmoA graphic overlay associated with a GameObject in a Scene, and displayed in the Scene View. Built-in scene tools such as the move tool are Gizmos, and you can create custom Gizmos using textures or scripting. Some Gizmos are only drawn when the GameObject is selected, while other Gizmos are drawn by the Editor regardless of which GameObjects are selected. More infocenterOfMass
. Unity can also change it based on collider placement. World Center of Mass The global location of the physics bodyâs center of mass along each vector. To change the center of mass via script, use worldCenterOfMass
. Unity can also change it based on collider placement. Sleep State The sleep state of the physics body. Displays Awake if the physics body is awake and included in physics calculations. Displays Asleep if the physics body is asleep, and not included in physics calculations. Sleep Threshold The energy threshold for the physics body, below which the physics engineA system that simulates aspects of physical systems so that objects can accelerate correctly and be affected by collisions, gravity and other forces. More infomaxLinearVelocity
. Max Angular Velocity The maximum rotational velocity the physics body can reach, defined by maxAngularVelocity
. Solver Iterations The number of iterations that the physics system solver needs to perform on this physics body. Solver Velocity Iteration The number of velocity iterations that the physics system solver needs to perform on this physics body. These bring the exit velocity of overlapping GameObjects closer to the correct value, taking into account the contact bounciness. Body Index The Articulation Body index in the tree. This property only appears for Articulation Bodies. Filtering
The Filtering tab contains properties to configure which physics elements appear in the Physics Debug visualization.
Property Description Show Physics Scene Select which Physics Scenes to include in the visualization, if you have multiple physics scenes loaded at once. Show Unity Scene Select which Unity Scenes to include in the visualization, if you have multiple scenes loaded at once. Show Layers Select which 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 infoThe Rendering tab contains properties to configure how Unity renders and displays the physics visualization.
Property Description Static Colliders Select a color to represent static Colliders (Colliders with no Rigidbody component) in the visualization. Triggers Select a color to represent Colliders that are also Triggers in the visualization. Rigidbodies Select a color to represent Rigidbody components in the visualization. Kinematic Bodies Select a color to represent kinematic Rigidbody components from the visualization. The physics system does not control kinematic Rigidbody components. Articulation Bodies Select a color to represent Articulation Body components in the visualization. Sleeping Bodies Select a color to represent Sleeping Rigidbody components (which are not currently engaging with the physics engine) from the visualization. Variation Define to what extent the selected colors blend with a random color. Use this to visually separate Colliders by color, and to see the structure of the GameObjects. The value is between 0 and 1, and is set to 0.15 by default. Transparency Set the transparency of drawn collision geometry in the visualization. The value is between 0 and 1, and is set to 0.5 by default. Force Overdraw Enable Force Overdraw to display collider geometry on top of render geometry in the visualization. This is useful if render geometry is obscuring collider visualizations. Disable Force Overdraw to display collider geometry as it appears in relation to the cameraA component which creates an image of a particular viewpoint in your scene. The output is either drawn to the screen or captured as a texture. More infoThe Contacts tab contains properties to configure which contact data appears in the Physics Debug visualization, and the colors used for different types of contact.
Property Description Show Contacts Enable Show Contacts to display visualization for contacts. - Show All Contacts Enable Show All Contacts to display visualization for all collision contact data in the Physics Debug visualization. Disable Show All Contacts to limit the contact data that appears in the Physics Debug visualization.MonoBehaviour
scripts that receive messages from OnCollisionEnter
, OnCollisionSay
, or OnCollisionExit
providesContact
property set to true. - Show Impulse Enable Show Impulse to display an arrow in the visualization that represents the contact point impulse. Disable Show Impulse to remove impulse visualization. - Show Separation Enable Show Separation to display a segment and disc in the visualization that represents contact point separation. Disable Show Separation to remove separation visualization. - Use Filtering settings Enable Use Filtering settings to use the settings in the Filtering tab to filter incoming contact visualization. Disable Use filtering settings to use only the settings in the Contacts tab. Contact colors Select the colors Unity should use in the visualization to indicate collision contact data. Use varied colors Enable Use varied colors to use random colors for each contacting Collider pair. Disable Use varied colors to use the three colors defined in the following properties (Contact color, Contact separation color, and Contact impulse color). Contact color Select a color to represent the contact. This appears in the visualization as an arrow that starts in the contact point and faces the contact normal. Contact separation color Select a color to represent the contact separation. This appears in the visualization as a segment and disc. Contact impulse color Select a color to represent the contact impulse. This appears in the visualization as an arrow that points in the normal direction, with a length equal to the length of the impulse. Queries
The Queries tab contains properties to configure which query types appear in the Physics Debug visualization, and how they appear. For information on PhysX queries, see the NVIDIA PhysX documentation on Scene Queries and Geometry Queries.
Property Description Show queries Enable Show queries to display visualization for physics queries. Query color Select the color Unity should use in the visualization to indicate physics queries. Show shapes Choose which query shapes to display in the Physics Debug visualization. Enable a query shape to display queries of that shape in the visualization. Disable a query shape to remove queries of that shape from the visualization.The options are:
The options are:
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4