{"id":2596,"date":"2025-11-16T18:39:15","date_gmt":"2025-11-16T18:39:15","guid":{"rendered":"https:\/\/golemitegames.com\/?post_type=docs&#038;p=2596"},"modified":"2025-12-28T23:02:44","modified_gmt":"2025-12-28T23:02:44","password":"","slug":"world-item","status":"publish","type":"docs","link":"https:\/\/golemitegames.com\/index.php\/docs\/world-item\/","title":{"rendered":"World Item"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\" style=\"font-size:22px;text-transform:capitalize\">Introduction<\/h2>\n\n\n\n<p>This component acts as a physical pick up that can be collected from any player character. <br><br>World Items are spawned from <a href=\"https:\/\/golemitegames.com\/index.php\/docs\/resource-node\/\" title=\"Resource Node\">ResourceNodes<\/a> and animate in an arc. Your playable character should have a layer than can be assigned in the settings of this component.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" style=\"font-size:22px;text-transform:capitalize\">Setting up<\/h2>\n\n\n\n<p>There is a WorldItem prefab located in \/prefabs. If you wanted to set this up yourself all you need is a mesh, a WorldItem component and a collider. You can set the arc of the animation via the settings. <\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img fetchpriority=\"high\" decoding=\"async\" width=\"520\" height=\"567\" src=\"https:\/\/golemitegames.com\/wp-content\/uploads\/2025\/11\/image-35.png\" alt=\"\" class=\"wp-image-2608\" style=\"width:400px\" srcset=\"https:\/\/golemitegames.com\/wp-content\/uploads\/2025\/11\/image-35.png 520w, https:\/\/golemitegames.com\/wp-content\/uploads\/2025\/11\/image-35-275x300.png 275w\" sizes=\"(max-width: 520px) 100vw, 520px\" \/><\/figure>\n\n\n\n<p>In order to actually spawn World Items, a <a href=\"https:\/\/golemitegames.com\/index.php\/docs\/resource-node\/\" title=\"Resource Node\">ResourceNode<\/a> will need to have its collect type set to WorldCollect and the <a href=\"https:\/\/golemitegames.com\/index.php\/docs\/item\/\" title=\"Item\">Item<\/a> Scriptable Object will need to have one or more prefabs assigned to the list with this component on. <\/p>\n\n\n\n<h2 class=\"wp-block-heading\" style=\"font-size:22px;text-transform:capitalize\">Settings<\/h2>\n\n\n\n<p><strong>Arc Height<\/strong><br>The maximum height the gameobject should reach when animating.<br><br><strong>Arc Distance<\/strong><br>How far the gameobject around the <a href=\"https:\/\/golemitegames.com\/index.php\/docs\/resource-node\/\" title=\"Resource Node\">ResourceNode<\/a> should reach when animating.<br><br><strong>Distance Variation<\/strong><br>The variation in the Arc Distance. A value of 0.5 will assign a random value to Arc Distance plus or minus this value and anywhere in between.<br><br><strong>Animation Duration<\/strong><br>How long it takes for the arc animation to complete.<br><br><strong>Floor Offset<\/strong><br>The Y offset that the WorldItem Gameobject will sit at when the animation has finished.<br><br><strong>Rotate Speed<\/strong><br>The speed in which the idle WorldItem will rotate at once the animation has finished. <br><br><strong>Use 2D Axis<\/strong><br>Uses the Z axis for arc height instead of Y and the XY axis for distance and direction instead XZ. <br><br><strong>Draw Gizmos<\/strong><br>Display the animation arc and landing point &#8211; take into account however this does not take into account the Distance Variation variable.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" style=\"font-size:22px;text-transform:capitalize\">Extras<\/h2>\n\n\n\n<p>Adding a <a href=\"https:\/\/golemitegames.com\/index.php\/docs\/popup-spawner\/\" title=\"Popup Spawner\">PopupSpawner<\/a> to as a child to this component will enable popup spawning when the WorldItem is collected.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" style=\"font-size:22px;text-transform:capitalize\">Event<\/h2>\n\n\n\n<p><strong>On Item Collect<\/strong><br>Triggers when clicked on in the world<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" style=\"font-size:22px;text-transform:capitalize\">Scripting<\/h2>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-csharp\" data-lang=\"C#\" data-show-lang=\"0\"><code>\/\/Action\npublic Action&lt;ItemAmount&gt; OnItemCollect; \n\n\/\/Usage\nif (worldItem != null)\n{\n    worldItem.OnItemCollect += (itemAmount) =&gt; StartCoroutine(SpawnPopup(itemAmount, true));\n}<\/code><\/pre><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Introduction This component acts as a physical pick up that can be collected from any player character. World Items are spawned from ResourceNodes and animate in an arc. Your playable character should have a layer than can be assigned in the settings of this component. Setting up There is a WorldItem prefab located in \/prefabs. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_acf_changed":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"doc_category":[46],"doc_tag":[],"class_list":["post-2596","docs","type-docs","status-publish","hentry","doc_category-resource-and-production"],"acf":[],"aioseo_notices":[],"year_month":"2026-04","word_count":314,"total_views":0,"reactions":{"happy":0,"normal":0,"sad":0},"author_info":{"name":"rickitz5h","author_nicename":"rickitz5h","author_url":"https:\/\/golemitegames.com\/index.php\/author\/rickitz5h\/"},"doc_category_info":[{"term_name":"Resource And Production","term_url":"https:\/\/golemitegames.com\/index.php\/docs-category\/resource-and-production\/"}],"doc_tag_info":[],"_links":{"self":[{"href":"https:\/\/golemitegames.com\/index.php\/wp-json\/wp\/v2\/docs\/2596","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/golemitegames.com\/index.php\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/golemitegames.com\/index.php\/wp-json\/wp\/v2\/types\/docs"}],"author":[{"embeddable":true,"href":"https:\/\/golemitegames.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/golemitegames.com\/index.php\/wp-json\/wp\/v2\/comments?post=2596"}],"version-history":[{"count":5,"href":"https:\/\/golemitegames.com\/index.php\/wp-json\/wp\/v2\/docs\/2596\/revisions"}],"predecessor-version":[{"id":2610,"href":"https:\/\/golemitegames.com\/index.php\/wp-json\/wp\/v2\/docs\/2596\/revisions\/2610"}],"wp:attachment":[{"href":"https:\/\/golemitegames.com\/index.php\/wp-json\/wp\/v2\/media?parent=2596"}],"wp:term":[{"taxonomy":"doc_category","embeddable":true,"href":"https:\/\/golemitegames.com\/index.php\/wp-json\/wp\/v2\/doc_category?post=2596"},{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/golemitegames.com\/index.php\/wp-json\/wp\/v2\/doc_tag?post=2596"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}