A Static RigidbodyA component that allows a GameObject to be affected by simulated gravity and other forces. More info
See in Glossary 2D is designed to not move under simulation at all. If anything collides with it, a Static Rigidbody 2D behaves like an immovable object (as though it has infinite mass). It is also the least resource intensive Body TypeDefines a fixed behavior for a 2D Rigidbody. Can be Dynamic (the body moves under simulation and is affected by forces like gravity), Kinematic (the body moves under simulation, but and isn’t affected by forces like gravity) or Static (the body doesn’t move under simulation). More info
See in Glossary. A Static body only collides with Dynamic Rigidbody 2Ds. Note: Having two Static Rigidbody 2Ds collide is not supported, since they are not designed to move.
Due to their limited behavior, only a very limited set of properties are available for this Body Type.
Property | Function | |
---|---|---|
Body Type | Select to set the movement behavior and 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 2D interaction of this Rigidbody 2D’s component settings. |
|
Dynamic | Select to set this Rigidbody 2D to the Dynamic Body Type, which is designed to move under simulation and has all Rigidbody 2D properties available. The is the default Body Type for a Rigidbody 2D | |
Kinematic | Select to set this Rigidbody 2D to the Kinematic Body Type, which is designed to move under simulation but only under very explicit user control. Refer to Body Type: Kinematic for more information. | |
Static | Select to set this Rigidbody 2D to the Static Body Type, which is designed to not move under simulation at all and behaves like an immovable object with infinite mass. | |
Material | Set a common physics material for all Collider 2Ds attached to this Rigidbody 2D. Note: A Collider 2D uses its own Material property if it has one set. If there is no Material specified here or in the Collider 2D, the default option is None (Physics Material 2D). This uses a default Material which you can set in the Physics 2D window. Tip: Use this to ensure that all Collider 2Ds attached to the same Static Body Type Rigidbody 2D can all use the same Material. |
|
Simulated | Enable Simulated to have the Rigidbody 2D and any attached Collider 2Ds and JointA physics component allowing a dynamic connection between Rigidbody components, usually allowing some degree of movement such as a hinge. More info See in Glossary 2Ds to interact with the physics simulation during runtime. If this is disabled, these components do not interact with the simulation. Refer to Rigidbody 2D properties: Simulated, below for more details. This property is enabled by default. |
|
Layer Overrides | Expand for the Layer override settings. | |
Include Layers | Select the additional Layers that all Collider 2Ds attached to this Rigidbody 2D should include, when deciding if a 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 with another Collider2D should occur or not. Refer to Rigidbody2D-includeLayers for more information. |
|
Exclude Layers | Select the additional Layers that all Collider 2Ds attached to this Rigidbody 2D should exclude, when deciding if a collision with another Collider 2D should occur or not. Refer to Rigidbody2D-excludeLayers for more information. |
Aside from setting the Rigidbody 2D to the Static Body Type, there is another scenario where a Static Rigidbody 2D is created. This is when a GameObjectThe 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 with a Collider 2D component does not have a Rigidbody 2D component at all. All Collider 2Ds without a Rigidbody 2D component are internally considered to be attached to a single hidden Static Rigidbody 2D component.
This means that you are able to create a large number of Static Collider 2Ds as you do not have to add a Rigidbody 2D component for each individual GameObject. Both methods of creating Static Collider 2Ds have their advantages, depending on the scenario.
If an individual Static Collider 2D needs to be moved or reconfigured at runtime, then add a Rigidbody 2D component and set it to the Static Body Type, as it is faster to simulate the Collider 2D when it has its own Rigidbody 2D. If a group of Collider 2Ds needs to be moved or reconfigured at runtime, it is faster to have them all be children of the single hidden parent Rigidbody 2D than to move each GameObject individually.
Note: As stated above, Static Rigidbody 2Ds are designed not to move, and collisions between two Static Rigidbody 2D objectsA 2D GameObject such as a tilemap or sprite. More info
See in Glossary that intersect are not registered. However, Static Rigidbody 2Ds and Kinematic Rigidbody 2Ds will interact with each other if one of their Collider 2Ds is set to be a trigger. There is also a feature that changes what a Kinematic body will interact with (see Use Full Kinematic Contacts for more information).
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.