{"id":2876,"date":"2022-02-10T10:41:03","date_gmt":"2022-02-10T08:41:03","guid":{"rendered":"https:\/\/beethebest.fun\/?p=2876"},"modified":"2022-02-10T10:46:25","modified_gmt":"2022-02-10T08:46:25","slug":"fisicas-de-unity","status":"publish","type":"post","link":"https:\/\/beethebest.fun\/ca\/fisicas-de-unity\/","title":{"rendered":"F\u00cdSIQUES DE UNITY"},"content":{"rendered":"<p>[vc_row][vc_column][vc_column_text]<\/p>\n<p style=\"text-align: justify\">Unity compta amb el seu propi sistema de f\u00edsiques incorporat, de manera que pots crear interaccions b\u00e0siques entre objectes en nom\u00e9s un parell de minuts. Com a regla general, si el teu joc compta amb cap component de joc (<em>gameobject<\/em>) en moviment, et caldr\u00e0 utilitzar <em>rigidbodys<\/em>. Aquests cossos r\u00edgids s\u00f3n components que permeten que els objectes del joc o projecte en q\u00fcesti\u00f3, es vegin afectats per les f\u00edsiques. \u00c9s a dir, fan que l&#8217;objecte caigui a terra per l\u2019efecte de la gravetat i contenen propietats f\u00edsiques com s\u00f3n la massa, l&#8217;arrossegament i la velocitat. \u00c9s important recordar per\u00f2, que l&#8217;objecte ha de tenir un col\u00b7lisionador connectat per tal de poder interactuar amb altres objectes f\u00edsics.<\/p>\n<p style=\"text-align: justify\">Aix\u00ed, amb nom\u00e9s un parell de peces i aquests dos components, pots crear mec\u00e0niques de joc molt interessants sense preocupar-te massa per la part de la programaci\u00f3 \/ codi!<\/p>\n<p style=\"text-align: justify\">En aquest exemple, he construit una torre Jenga molt senzilla per mostrar-vos com interactuen les diferents peces en moviment amb l&#8217;estructura general:<\/p>\n<p>[\/vc_column_text][\/vc_column][\/vc_row][vc_row][vc_column][vc_single_image image=&#8221;2840&#8243; img_size=&#8221;full&#8221; alignment=&#8221;center&#8221; style=&#8221;vc_box_rounded&#8221; css_animation=&#8221;fadeInUp&#8221; lazy_loading=&#8221;true&#8221;][\/vc_column][\/vc_row]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Unity t\u00e9 el seu propi sistema de f\u00edsiques constru\u00eft a l&#8217;interior, de manera que pots crear interaccions b\u00e0siques&#8230; <\/p>\n","protected":false},"author":3,"featured_media":2825,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"iawp_total_views":0,"footnotes":""},"categories":[79,92],"tags":[235,234,236,237,95],"class_list":["post-2876","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-eines","category-programacio","tag-cossos-rigids","tag-fisiques","tag-gravetat","tag-jenga-ca","tag-unity-ca","category-79","category-92","description-off"],"aioseo_notices":[],"views":74,"_links":{"self":[{"href":"https:\/\/beethebest.fun\/ca\/wp-json\/wp\/v2\/posts\/2876","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/beethebest.fun\/ca\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/beethebest.fun\/ca\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/beethebest.fun\/ca\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/beethebest.fun\/ca\/wp-json\/wp\/v2\/comments?post=2876"}],"version-history":[{"count":9,"href":"https:\/\/beethebest.fun\/ca\/wp-json\/wp\/v2\/posts\/2876\/revisions"}],"predecessor-version":[{"id":2898,"href":"https:\/\/beethebest.fun\/ca\/wp-json\/wp\/v2\/posts\/2876\/revisions\/2898"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/beethebest.fun\/ca\/wp-json\/wp\/v2\/media\/2825"}],"wp:attachment":[{"href":"https:\/\/beethebest.fun\/ca\/wp-json\/wp\/v2\/media?parent=2876"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/beethebest.fun\/ca\/wp-json\/wp\/v2\/categories?post=2876"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/beethebest.fun\/ca\/wp-json\/wp\/v2\/tags?post=2876"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}