{"id":67,"date":"2020-06-03T01:16:23","date_gmt":"2020-06-03T01:16:23","guid":{"rendered":"https:\/\/lucyestela.com\/dev\/?p=67"},"modified":"2021-03-02T03:01:47","modified_gmt":"2021-03-02T03:01:47","slug":"what-is-the-rigidbody-component","status":"publish","type":"post","link":"https:\/\/lucyestela.com\/dev\/unity\/what-is-the-rigidbody-component\/","title":{"rendered":"What is the Rigidbody component? &#8211; Unity"},"content":{"rendered":"<div class=\"boldgrid-section\">\n<div class=\"container\">\n<div class=\"row\">\n<div class=\"col-md-12 col-xs-12 col-sm-12\">\n<p class=\"\">Basically you add this to any gameobject that you want to act under the control of physics.It is added as a component in the inspector window in Unity.<\/p>\n<p class=\"\">In your class file for the gameobject you can make it a required component so that you don&#8217;t need to check that it&#8217;s there. You do this with the code<\/p>\n<pre class=\"\"><span style=\"font-family: Menlo;\"> <span style=\"color: #222222;\">[<\/span><span style=\"color: #3363a4;\">RequireComponent<\/span><span style=\"color: #222222;\">(<\/span><span style=\"color: #009695;\">typeof<\/span><span style=\"color: #222222;\">(<\/span><span style=\"color: #3363a4;\">Rigidbody<\/span><span style=\"color: #222222;\">))]<\/span><\/span><\/pre>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Basically you add this to any gameobject that you want to act under the control of physics.It is added as a component in the inspector window in Unity. In your class file for the gameobject you can make it a required component so that you don&#8217;t need to check that it&#8217;s there. You do this &#8230; <a title=\"What is the Rigidbody component? &#8211; Unity\" class=\"read-more\" href=\"https:\/\/lucyestela.com\/dev\/unity\/what-is-the-rigidbody-component\/\" aria-label=\"More on What is the Rigidbody component? &#8211; Unity\">Read more<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"bgseo_title":"","bgseo_description":"","bgseo_robots_index":"index","bgseo_robots_follow":"follow","footnotes":""},"categories":[58],"tags":[7,11,10,4],"class_list":["post-67","post","type-post","status-publish","format-standard","hentry","category-unity","tag-c","tag-requirecomponent","tag-rigidbody","tag-unity"],"_links":{"self":[{"href":"https:\/\/lucyestela.com\/dev\/wp-json\/wp\/v2\/posts\/67","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lucyestela.com\/dev\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lucyestela.com\/dev\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lucyestela.com\/dev\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/lucyestela.com\/dev\/wp-json\/wp\/v2\/comments?post=67"}],"version-history":[{"count":4,"href":"https:\/\/lucyestela.com\/dev\/wp-json\/wp\/v2\/posts\/67\/revisions"}],"predecessor-version":[{"id":247,"href":"https:\/\/lucyestela.com\/dev\/wp-json\/wp\/v2\/posts\/67\/revisions\/247"}],"wp:attachment":[{"href":"https:\/\/lucyestela.com\/dev\/wp-json\/wp\/v2\/media?parent=67"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lucyestela.com\/dev\/wp-json\/wp\/v2\/categories?post=67"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lucyestela.com\/dev\/wp-json\/wp\/v2\/tags?post=67"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}