{"id":281,"date":"2016-10-24T09:57:16","date_gmt":"2016-10-24T09:57:16","guid":{"rendered":"http:\/\/nbodyphysics.com\/blog\/?page_id=281"},"modified":"2016-10-30T09:39:58","modified_gmt":"2016-10-30T09:39:58","slug":"tutorial-0-overview","status":"publish","type":"page","link":"https:\/\/nbodyphysics.com\/blog\/gravity-engine-doc-1-3-2-2-2\/tutorials\/tutorial-0-overview\/","title":{"rendered":"Tutorial 0 &#8211; Overview"},"content":{"rendered":"<h2><\/h2>\n<p><iframe loading=\"lazy\" title=\"T0-Overview 720p\" width=\"625\" height=\"352\" src=\"https:\/\/www.youtube.com\/embed\/LhEa4FS-His?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe><\/p>\n<ol>\n<li>Begin with an empty scene<\/li>\n<li>Create a GravityEngine (GameObject\/3D Object\/GravityEngine)<\/li>\n<li>Create a Star:\n<ol>\n<li>Create an empty game object and name it \u201cStar\u201d<\/li>\n<li>Add an NBody component (Add Component\/Scripts\/NBody). Set the mass to 1000\n<ol>\n<li>This script ensures the gravity engine controls this object. It provides the values for mass and initial velocity.<\/li>\n<li>The Transform component now changes to show only the position. Orbits in the gravity engine asset use hierarchy and this relies on a scale of 1 in the transform element.<\/li>\n<\/ol>\n<\/li>\n<\/ol>\n<\/li>\n<li>Create a model for the star (Game Objects\/3D Object\/Star)\n<ol>\n<li>Make this a child of the Star with local position (0,0,0)\n<ol>\n<li>Making the model a child allows the size of the Star to be adjusted without adversely impacting the scaling of other children.<\/li>\n<\/ol>\n<\/li>\n<li>Add the Solar Texture as a Material<\/li>\n<li>Adjust the size to (5,5,5)<\/li>\n<\/ol>\n<\/li>\n<li>Create a planet (Repeat 3 and 4 naming the object \u201cPlanet\u201d).\n<ol>\n<li>Give the planet a mass of 5<\/li>\n<li>Add a material e.g. Ganymede from PATH_HERE<\/li>\n<\/ol>\n<\/li>\n<li>Add an OrbitEllipse component to the Planet.\n<ol>\n<li>This script defines orbital motion around a specified body. It will automatically select a parent object as this body.<\/li>\n<\/ol>\n<\/li>\n<li>Make the planet a child of the Star.<\/li>\n<li>Look at OrbitEllipse in the Inspector and scene view\n<ol>\n<li>Set the \u201cSemi-Major Axis\u201d to 10<\/li>\n<li>Experiment with the orbit attributes and observe how they change in the scene view.<\/li>\n<\/ol>\n<\/li>\n<li>Press play to see the planet orbit the sun\n<ol>\n<li>Can adjust the camera settings to see the orbit (z=-30)<\/li>\n<li>Change camera settings to a background with a solid color if you wish.<\/li>\n<\/ol>\n<\/li>\n<li>Create an empty game object \u201cDustRing\u201d<\/li>\n<li>Add a particle system\n<ol>\n<li>Duration=999<\/li>\n<li>Start lifetime=999<\/li>\n<li>Start Speed=0<\/li>\n<li>Emission Rate=0<\/li>\n<li>Emit as a burst of 1000 at time=0<\/li>\n<\/ol>\n<\/li>\n<li>Add a GravityParticles script to DustRing object.\n<ol>\n<li>This script indicates the Gravity Engine will control the particles.<\/li>\n<\/ol>\n<\/li>\n<li>Add a DustRing script to DustRing object. This controls the initial position and velocity of the particles.\n<ol>\n<li>Add a material (e.g. BlueMat at PATH)<\/li>\n<li>Adjust the orbit to the desired size and shape.<\/li>\n<\/ol>\n<\/li>\n<li>Make the DustRing object a child of the star.<\/li>\n<li>Press play to see the dust ring and planet.<\/li>\n<\/ol>\n<h2><\/h2>\n","protected":false},"excerpt":{"rendered":"<p>Begin with an empty scene Create a GravityEngine (GameObject\/3D Object\/GravityEngine) Create a Star: Create an empty game object and name it \u201cStar\u201d Add an NBody component (Add Component\/Scripts\/NBody). Set the mass to 1000 This script ensures the gravity engine controls this object. It provides the values for mass and initial velocity. The Transform component now [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":1048,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"jetpack_post_was_ever_published":false,"footnotes":""},"class_list":["post-281","page","type-page","status-publish","hentry"],"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/P3pCRa-4x","_links":{"self":[{"href":"https:\/\/nbodyphysics.com\/blog\/wp-json\/wp\/v2\/pages\/281","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nbodyphysics.com\/blog\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/nbodyphysics.com\/blog\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/nbodyphysics.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/nbodyphysics.com\/blog\/wp-json\/wp\/v2\/comments?post=281"}],"version-history":[{"count":3,"href":"https:\/\/nbodyphysics.com\/blog\/wp-json\/wp\/v2\/pages\/281\/revisions"}],"predecessor-version":[{"id":331,"href":"https:\/\/nbodyphysics.com\/blog\/wp-json\/wp\/v2\/pages\/281\/revisions\/331"}],"up":[{"embeddable":true,"href":"https:\/\/nbodyphysics.com\/blog\/wp-json\/wp\/v2\/pages\/1048"}],"wp:attachment":[{"href":"https:\/\/nbodyphysics.com\/blog\/wp-json\/wp\/v2\/media?parent=281"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}