<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	 xmlns:media="http://search.yahoo.com/mrss/" >

<channel>
	<title>Scene2D &#8211; AnonyViet &#8211; English Version</title>
	<atom:link href="https://en.anonyviet.com/tag/scene2d/feed/" rel="self" type="application/rss+xml" />
	<link>https://en.anonyviet.com</link>
	<description>The most popular website for sharing information technology, computer networks, and security knowledge. Stay up to date with the hottest news and tips</description>
	<lastBuildDate>Wed, 01 Feb 2023 06:45:58 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.1.5</generator>

<image>
	<url>https://en.anonyviet.com/wp-content/uploads/2023/01/cropped-ico-logo-75x75-1.png</url>
	<title>Scene2D &#8211; AnonyViet &#8211; English Version</title>
	<link>https://en.anonyviet.com</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Basic operations on Scene2D &#8211; Basic Godot Engine</title>
		<link>https://en.anonyviet.com/basic-operations-on-scene2d-basic-godot-engine/</link>
					<comments>https://en.anonyviet.com/basic-operations-on-scene2d-basic-godot-engine/#respond</comments>
		
		<dc:creator><![CDATA[AnonyViet]]></dc:creator>
		<pubDate>Wed, 01 Feb 2023 06:45:58 +0000</pubDate>
				<category><![CDATA[Tips]]></category>
		<category><![CDATA[Basic]]></category>
		<category><![CDATA[Engine]]></category>
		<category><![CDATA[Godot]]></category>
		<category><![CDATA[operations]]></category>
		<category><![CDATA[Scene2D]]></category>
		<guid isPermaLink="false">https://en.anonyviet.com/?p=7786</guid>

					<description><![CDATA[Hi! Hello friends! Today&#8217;s post, I continue to share with you Basic operations on Scene2D (a 2-dimensional workspace window) on Godot Engine! No more roundabouts, let&#8217;s go to the article! Let&#8217;s go! Join the channel Telegram of the AnonyViet 👉 Link 👈 SCENE2D WORKING WINDOWS To work on the Scene 2D window, we choose to [&#8230;]]]></description>
										<content:encoded><![CDATA[<p></p>
<div id="ftwp-postcontent">
<p style="text-align: left"><strong>Hi!  Hello friends!  Today&#8217;s post, I continue to share with you Basic operations on Scene2D (a 2-dimensional workspace window) on Godot Engine!  No more roundabouts, let&#8217;s go to the article!  Let&#8217;s go!</strong></p>
<div class="code-block code-block-16" style="margin: 8px 0; clear: both;">
<div align="center">
<table class=" aligncenter" style="background-color: #c0c0c0; border-collapse: collapse; width: 59.9985%;">
<tbody>
<tr>
<td style="width: 100%; text-align: center;"><span style="font-size: 12pt;"><strong>Join the channel <span style="color: #0000ff;">Telegram</span> of the <span style="color: #008080;">AnonyViet </span> 👉 <span style="text-decoration: underline;"><a target="_blank" href="https://en.anonyviet.com/next-link?url=https%3A%2F%2Ft.me%2Fanonyvietchat" class="local-link" rel="noopener">Link</a></span>  👈</strong></span></td>
</tr>
</tbody>
</table>
</div>
</div>
<h2 id="ftoc-cua-so-lam-viec-scene2d" class="ftwp-heading"><strong><span style="font-size: 14pt">SCENE2D WORKING WINDOWS</span></strong></h2>
<p>To work on the Scene 2D window, we choose to enter the 2D Mode:<img fetchpriority="high" decoding="async" width="483" height="230" class="alignnone wp-image-20135 size-full" src="https://anonyviet.com/wp-content/uploads/2020/06/Picture1-1-1.png" alt="Basic operations on Scene2D" srcset="https://anonyviet.com/wp-content/uploads/2020/06/Picture1-1-1.png 483w, https://anonyviet.com/wp-content/uploads/2020/06/Picture1-1-1-300x143.png 300w" sizes="(max-width: 483px) 100vw, 483px" title="Basic operations on Scene2D - Basic Godot Engine 39"/></p>
<p>Then we will see the Scene 2D working window as follows:</p>
<p><img decoding="async" loading="lazy" width="677" height="462" class="alignnone wp-image-20136 size-full" src="https://anonyviet.com/wp-content/uploads/2020/06/Picture2-1.png" alt="how to use Scene2D godot engine" srcset="https://anonyviet.com/wp-content/uploads/2020/06/Picture2-1.png 677w, https://anonyviet.com/wp-content/uploads/2020/06/Picture2-1-300x205.png 300w" sizes="auto, (max-width: 677px) 100vw, 677px" title="Basic operations on Scene2D - Basic Godot Engine 40"/></p>
<p>– At the top is the name Scene</p>
<p>– Below is the toolbar to manipulate the objects in the Scene</p>
<p>– Below is the main working screen of a Scene including:</p>
<p>+ Coordinate axis Oxy</p>
<p>+ Viewport 2D (2D viewport)</p>
<h3 id="ftoc-truc-toa-do-oxy-tren-godot-engine" class="ftwp-heading"><span style="font-size: 12pt">Oxygen coordinate axis (on Godot Engine)</span></h3>
<p>– A line of two perpendicular lines intersecting at a point O (O is taken as the center and is called the coordinate angle)</p>
<p>+ The line lying horizontally from a straight and front view is called the coordinate (Horizontal axis, x axis, Cos axis) whose length from left to right is respectively</p>
<p>(-oo;+oo)</p>
<p>+ The vertical line from the straight and front view is called the coordinate (Vertical Axis, Y Axis, Sin Axis) whose length from top to bottom is (-oo;+oo) respectively.</p>
<p>+ The unit of coordinate angle O is (0,0)</p>
<p><img decoding="async" loading="lazy" width="677" height="407" class="alignnone wp-image-20137 size-full" src="https://anonyviet.com/wp-content/uploads/2020/06/Picture3-1.png" alt="Scene2D user manual" srcset="https://anonyviet.com/wp-content/uploads/2020/06/Picture3-1.png 677w, https://anonyviet.com/wp-content/uploads/2020/06/Picture3-1-300x180.png 300w" sizes="auto, (max-width: 677px) 100vw, 677px" title="Basic operations on Scene2D - Basic Godot Engine 41"/></p>
<ul>
<li><strong>Object A placed on the Oxy axis system (A must be visible objects such as Node2D, Spatical, Control, etc., not applicable to White Nodes and Control Nodes)</strong></li>
</ul>
<p>– For example, we bring some object A to this Oxy coordinate system.  Suppose     <img decoding="async" loading="lazy" width="58" height="58" class="size-full wp-image-20139 alignnone" src="https://anonyviet.com/wp-content/uploads/2020/06/Picture4-1.png" alt="Basic operations on Scene2D - Basic Godot Engine 34" title="Basic operations on Scene2D - Basic Godot Engine 42"/>is an object.  Then we bring     <img decoding="async" loading="lazy" width="58" height="58" class="alignnone size-full wp-image-20139" src="https://anonyviet.com/wp-content/uploads/2020/06/Picture4-1.png" alt="Basic operations on Scene2D - Basic Godot Engine 35" title="Basic operations on Scene2D - Basic Godot Engine 43"/>into the Oxygen system, it will generate a position (position), a size (scale) corresponding to the system of type <em>Vector2(x unit, y unit)</em></p>
<p>– Vector2 is a data type representing locations in 2D space</p>
<p><img decoding="async" loading="lazy" width="677" height="407" class="alignnone size-full wp-image-20140" src="https://anonyviet.com/wp-content/uploads/2020/06/Picture4-1-2.png" alt="Basic operations on Scene2D - Basic Godot Engine 36" srcset="https://anonyviet.com/wp-content/uploads/2020/06/Picture4-1-2.png 677w, https://anonyviet.com/wp-content/uploads/2020/06/Picture4-1-2-300x180.png 300w" sizes="auto, (max-width: 677px) 100vw, 677px" title="Basic operations on Scene2D - Basic Godot Engine 44"/></p>
<p>– The position of Godot on the x-axis is 5 units, on the y-axis is 0 units to the center of the object</p>
<p>– The Godot size on the x and y axes is 2 units based on the distance from the beginning to the end of the length and width.</p>
<p>– We can briefly represent the position and size of Godot by Vecto2() as follows:</p>
<p><em><code>#Godot.position = Vecto2(5,0)</code></em></p>
<p><em><code>#Godot.scale = Vecto2(2,2)</code></em></p>
<h3 id="ftoc-doi-tuong-co-the-xoay-quay-tam-cua-minh-rotation" class="ftwp-heading">Objects can rotate their center (rotation)</h3>
<h4><img decoding="async" loading="lazy" width="677" height="407" class="alignnone size-full wp-image-20141" src="https://anonyviet.com/wp-content/uploads/2020/06/Picture5-1.png" alt="Basic operations on Scene2D - Basic Godot Engine 37" srcset="https://anonyviet.com/wp-content/uploads/2020/06/Picture5-1.png 677w, https://anonyviet.com/wp-content/uploads/2020/06/Picture5-1-300x180.png 300w" sizes="auto, (max-width: 677px) 100vw, 677px" title="Basic operations on Scene2D - Basic Godot Engine 45"/></h4>
<p style="text-align: center"><strong>We have A, B, C with each different rotation in degrees (0->360°)</strong></p>
<p>– We can change the position, scale, rotation_degree in the Transform section of the object&#8217;s properties (Inspector).</p>
<p><img decoding="async" loading="lazy" width="468" height="330" class="alignnone size-full wp-image-20142" src="https://anonyviet.com/wp-content/uploads/2020/06/Picture6.png" alt="Basic operations on Scene2D - Basic Godot Engine 38" srcset="https://anonyviet.com/wp-content/uploads/2020/06/Picture6.png 468w, https://anonyviet.com/wp-content/uploads/2020/06/Picture6-300x212.png 300w, https://anonyviet.com/wp-content/uploads/2020/06/Picture6-120x86.png 120w" sizes="auto, (max-width: 468px) 100vw, 468px" title="Basic operations on Scene2D - Basic Godot Engine 46"/></p>
<h3 id="ftoc-cac-doi-tuong-co-the-xep-chong-len-nhau-zindex" class="ftwp-heading"><strong>Stackable objects (Zindex)</strong></h3>
<p><img decoding="async" loading="lazy" width="846" height="626" class="alignnone size-full wp-image-20143" src="https://anonyviet.com/wp-content/uploads/2020/06/Picture7-1.png" alt="Basic operations on Scene2D - Basic Godot Engine 39" srcset="https://anonyviet.com/wp-content/uploads/2020/06/Picture7-1.png 846w, https://anonyviet.com/wp-content/uploads/2020/06/Picture7-1-300x222.png 300w, https://anonyviet.com/wp-content/uploads/2020/06/Picture7-1-768x568.png 768w, https://anonyviet.com/wp-content/uploads/2020/06/Picture7-1-750x555.png 750w" sizes="auto, (max-width: 846px) 100vw, 846px" title="Basic operations on Scene2D - Basic Godot Engine 47"/></p>
<p>Because we are using 2D Mode, we can&#8217;t see the Z-axis directly, but we can change the Zindex so that the objects stack on top of each other in this view.</p>
<p><img decoding="async" loading="lazy" width="677" height="315" class="alignnone size-full wp-image-20144" src="https://anonyviet.com/wp-content/uploads/2020/06/Picture8-1.png" alt="Basic operations on Scene2D - Basic Godot Engine 40" srcset="https://anonyviet.com/wp-content/uploads/2020/06/Picture8-1.png 677w, https://anonyviet.com/wp-content/uploads/2020/06/Picture8-1-300x140.png 300w" sizes="auto, (max-width: 677px) 100vw, 677px" title="Basic operations on Scene2D - Basic Godot Engine 48"/></p>
<p style="text-align: center">You can find the Zindex in the properties section of Node.</p>
<h3 id="ftoc-cac-doi-tuong-co-the-thay-doi-cach-hien-thi-cua-minh-visiblity" class="ftwp-heading"><strong>Objects can change their appearance (Visiblity)</strong></h3>
<ul>
<li>Show and hide (visible)</li>
</ul>
<p><img decoding="async" loading="lazy" width="677" height="315" class="alignnone size-full wp-image-20145" src="https://anonyviet.com/wp-content/uploads/2020/06/Picture9-1.png" alt="Basic operations on Scene2D - Basic Godot Engine 41" srcset="https://anonyviet.com/wp-content/uploads/2020/06/Picture9-1.png 677w, https://anonyviet.com/wp-content/uploads/2020/06/Picture9-1-300x140.png 300w" sizes="auto, (max-width: 677px) 100vw, 677px" title="Basic operations on Scene2D - Basic Godot Engine 49"/></p>
<p style="text-align: center">Godot is showing</p>
<p>Can hide/show objects through Node&#8217;s eye icon (if any).</p>
<p><img decoding="async" loading="lazy" width="677" height="332" class="alignnone size-full wp-image-20146" src="https://anonyviet.com/wp-content/uploads/2020/06/Picture11-1.png" alt="Basic operations on Scene2D - Basic Godot Engine 42" srcset="https://anonyviet.com/wp-content/uploads/2020/06/Picture11-1.png 677w, https://anonyviet.com/wp-content/uploads/2020/06/Picture11-1-300x147.png 300w" sizes="auto, (max-width: 677px) 100vw, 677px" title="Basic operations on Scene2D - Basic Godot Engine 50"/></p>
<p style="text-align: center">Godot is hidden</p>
<p><img decoding="async" loading="lazy" width="677" height="332" class="alignnone size-full wp-image-20147" src="https://anonyviet.com/wp-content/uploads/2020/06/Picture12-1.png" alt="Basic operations on Scene2D - Basic Godot Engine 43" srcset="https://anonyviet.com/wp-content/uploads/2020/06/Picture12-1.png 677w, https://anonyviet.com/wp-content/uploads/2020/06/Picture12-1-300x147.png 300w" sizes="auto, (max-width: 677px) 100vw, 677px" title="Basic operations on Scene2D - Basic Godot Engine 51"/></p>
<p style="text-align: center">Godot is showing</p>
<h3 id="ftoc-canvasitem" class="ftwp-heading"><strong>CanvasItem</strong></h3>
<ul>
<li>Nodes displayed in the 2D Mode window are called a CanvasItem</li>
</ul>
<p><img decoding="async" loading="lazy" width="677" height="332" class="alignnone size-full wp-image-20148" src="https://anonyviet.com/wp-content/uploads/2020/06/Picture13-1-1.png" alt="Basic operations on Scene2D - Basic Godot Engine 44" srcset="https://anonyviet.com/wp-content/uploads/2020/06/Picture13-1-1.png 677w, https://anonyviet.com/wp-content/uploads/2020/06/Picture13-1-1-300x147.png 300w" sizes="auto, (max-width: 677px) 100vw, 677px" title="Basic operations on Scene2D - Basic Godot Engine 52"/></p>
<p style="text-align: center">Illustration 3 CanvasItem</p>
<h2 id="ftoc-cac-thao-tac-tren-canvasitem" class="ftwp-heading"><strong>Operations on CanvasItem</strong></h2>
<p><strong>– </strong>Select a CanvasItem (Select Mode)</p>
<p><img decoding="async" loading="lazy" width="677" height="318" class="alignnone size-full wp-image-20149" src="https://anonyviet.com/wp-content/uploads/2020/06/Picture14-1.png" alt="Basic operations on Scene2D - Basic Godot Engine 45" srcset="https://anonyviet.com/wp-content/uploads/2020/06/Picture14-1.png 677w, https://anonyviet.com/wp-content/uploads/2020/06/Picture14-1-300x141.png 300w" sizes="auto, (max-width: 677px) 100vw, 677px" title="Basic operations on Scene2D - Basic Godot Engine 53"/></p>
<p>Click the mouse icon on the Scene toolbar then left-click on the CanvasItem to be selected.  Or click on the Node corresponding to that CanvasItem.</p>
<p><img decoding="async" loading="lazy" width="677" height="318" class="alignnone size-full wp-image-20151" src="https://anonyviet.com/wp-content/uploads/2020/06/Picture15-1-1.png" alt="Basic operations on Scene2D - Basic Godot Engine 46" srcset="https://anonyviet.com/wp-content/uploads/2020/06/Picture15-1-1.png 677w, https://anonyviet.com/wp-content/uploads/2020/06/Picture15-1-1-300x141.png 300w" sizes="auto, (max-width: 677px) 100vw, 677px" title="Basic operations on Scene2D - Basic Godot Engine 54"/></p>
<p>You can also select multiple CanvasItems using the key combinations available on the HDH you are using.  (Similar to selecting multiple files).</p>
<p><img decoding="async" loading="lazy" width="677" height="375" class="alignnone size-full wp-image-20152" src="https://anonyviet.com/wp-content/uploads/2020/06/Picture16-2.png" alt="Basic operations on Scene2D - Basic Godot Engine 47" srcset="https://anonyviet.com/wp-content/uploads/2020/06/Picture16-2.png 677w, https://anonyviet.com/wp-content/uploads/2020/06/Picture16-2-300x166.png 300w" sizes="auto, (max-width: 677px) 100vw, 677px" title="Basic operations on Scene2D - Basic Godot Engine 55"/></p>
<p>Click Move Mode.  Then hold down the left mouse button on the object and drag and drop.  Or click on the object and use the navigation keys to move.</p>
<ul>
<li>Resize CanvasItem</li>
</ul>
<p><img decoding="async" loading="lazy" width="677" height="375" class="alignnone size-full wp-image-20153" src="https://anonyviet.com/wp-content/uploads/2020/06/Picture17-2.png" alt="Basic operations on Scene2D - Basic Godot Engine 48" srcset="https://anonyviet.com/wp-content/uploads/2020/06/Picture17-2.png 677w, https://anonyviet.com/wp-content/uploads/2020/06/Picture17-2-300x166.png 300w" sizes="auto, (max-width: 677px) 100vw, 677px" title="Basic operations on Scene2D - Basic Godot Engine 56"/></p>
<p>In select mode.  You click and hold the red dots around the object and drag and drop.  This will change the scale . value</p>
<p><img decoding="async" loading="lazy" width="677" height="375" class="alignnone size-full wp-image-20154" src="https://anonyviet.com/wp-content/uploads/2020/06/Picture18-2.png" alt="Basic operations on Scene2D - Basic Godot Engine 49" srcset="https://anonyviet.com/wp-content/uploads/2020/06/Picture18-2.png 677w, https://anonyviet.com/wp-content/uploads/2020/06/Picture18-2-300x166.png 300w" sizes="auto, (max-width: 677px) 100vw, 677px" title="Basic operations on Scene2D - Basic Godot Engine 57"/></p>
<p>Or you can drag the x, y scale axes in scale mode.</p>
<p><img decoding="async" loading="lazy" width="677" height="371" class="alignnone size-full wp-image-20155" src="https://anonyviet.com/wp-content/uploads/2020/06/Picture19-1.png" alt="Basic operations on Scene2D - Basic Godot Engine 50" srcset="https://anonyviet.com/wp-content/uploads/2020/06/Picture19-1.png 677w, https://anonyviet.com/wp-content/uploads/2020/06/Picture19-1-300x164.png 300w" sizes="auto, (max-width: 677px) 100vw, 677px" title="Basic operations on Scene2D - Basic Godot Engine 58"/></p>
<p style="text-align: center">In Rotate Mode, click and hold on the object and drag it around.</p>
<ul>
<li>Change the center of the CanvasItem (pivot).</li>
</ul>
<p><img decoding="async" loading="lazy" width="677" height="375" class="alignnone size-full wp-image-20156" src="https://anonyviet.com/wp-content/uploads/2020/06/Picture20-1.png" alt="Basic operations on Scene2D - Basic Godot Engine 51" srcset="https://anonyviet.com/wp-content/uploads/2020/06/Picture20-1.png 677w, https://anonyviet.com/wp-content/uploads/2020/06/Picture20-1-300x166.png 300w" sizes="auto, (max-width: 677px) 100vw, 677px" title="Basic operations on Scene2D - Basic Godot Engine 59"/></p>
<p>Select the Change rotation pivot mode -> Click and hold the position icon on the CanvasItem and drag and drop to the desired position.</p>
<ul>
<li>Change the CasvaItem&#8217;s view position</li>
</ul>
<p><img decoding="async" loading="lazy" width="677" height="447" class="alignnone size-full wp-image-20157" src="https://anonyviet.com/wp-content/uploads/2020/06/Picture21-1.png" alt="Basic operations on Scene2D - Basic Godot Engine 52" srcset="https://anonyviet.com/wp-content/uploads/2020/06/Picture21-1.png 677w, https://anonyviet.com/wp-content/uploads/2020/06/Picture21-1-300x198.png 300w" sizes="auto, (max-width: 677px) 100vw, 677px" title="Basic operations on Scene2D - Basic Godot Engine 60"/></p>
<p>Click Pan Mode -> Lick hold on an empty area on the 2D Scene window and drag and drop to the desired area.  Or right-click, scroll wheel when not using Pan Mode.</p>
<ul>
<li>Measure CanvasItem size.</li>
</ul>
<p><img decoding="async" loading="lazy" width="677" height="491" class="alignnone size-full wp-image-20158" src="https://anonyviet.com/wp-content/uploads/2020/06/Picture22-1.png" alt="Basic operations on Scene2D - Basic Godot Engine 53" srcset="https://anonyviet.com/wp-content/uploads/2020/06/Picture22-1.png 677w, https://anonyviet.com/wp-content/uploads/2020/06/Picture22-1-300x218.png 300w, https://anonyviet.com/wp-content/uploads/2020/06/Picture22-1-120x86.png 120w" sizes="auto, (max-width: 677px) 100vw, 677px" title="Basic operations on Scene2D - Basic Godot Engine 61"/></p>
<p style="text-align: center">Select the Ruler Mode (triangle), lick and drag the areas to be measured.</p>
<ul>
<li>CanvasItem Move Lock</li>
</ul>
<p><img decoding="async" loading="lazy" width="677" height="291" class="alignnone size-full wp-image-20159" src="https://anonyviet.com/wp-content/uploads/2020/06/Picture23-1.png" alt="Basic operations on Scene2D - Basic Godot Engine 54" srcset="https://anonyviet.com/wp-content/uploads/2020/06/Picture23-1.png 677w, https://anonyviet.com/wp-content/uploads/2020/06/Picture23-1-300x129.png 300w" sizes="auto, (max-width: 677px) 100vw, 677px" title="Basic operations on Scene2D - Basic Godot Engine 62"/></p>
<p>To avoid selecting the wrong objects, you use the object lock mode by selecting an object to lock, clicking the lock tubular icon on the scene toolbar.  You can unlock it by clicking the icon again.  Or click the Node keypipe icon in the Scene Tree.</p>
<p><img decoding="async" loading="lazy" width="677" height="291" class="alignnone size-full wp-image-20160" src="https://anonyviet.com/wp-content/uploads/2020/06/Picture24-1.png" alt="Basic operations on Scene2D - Basic Godot Engine 55" srcset="https://anonyviet.com/wp-content/uploads/2020/06/Picture24-1.png 677w, https://anonyviet.com/wp-content/uploads/2020/06/Picture24-1-300x129.png 300w" sizes="auto, (max-width: 677px) 100vw, 677px" title="Basic operations on Scene2D - Basic Godot Engine 63"/></p>
<p>Or you can lock all child Nodes of the object by clicking Lock object&#8217;s children.</p>
<ul>
<li>Set smart location by snapping</li>
</ul>
<p><img decoding="async" loading="lazy" width="677" height="278" class="alignnone size-full wp-image-20161" src="https://anonyviet.com/wp-content/uploads/2020/06/Picture25-1.png" alt="Basic operations on Scene2D - Basic Godot Engine 56" srcset="https://anonyviet.com/wp-content/uploads/2020/06/Picture25-1.png 677w, https://anonyviet.com/wp-content/uploads/2020/06/Picture25-1-300x123.png 300w" sizes="auto, (max-width: 677px) 100vw, 677px" title="Basic operations on Scene2D - Basic Godot Engine 64"/></p>
<p>You can move objects more precisely with snapping magnets.  It will help you to suggest the margins of other objects so you can place objects more precisely.</p>
<p><strong>Note</strong>: Observe the settings for Node</p>
<p><img decoding="async" loading="lazy" width="500" height="98" class="alignnone size-full wp-image-20162" src="https://anonyviet.com/wp-content/uploads/2020/06/Picture26.png" alt="Basic operations on Scene2D - Basic Godot Engine 57" srcset="https://anonyviet.com/wp-content/uploads/2020/06/Picture26.png 500w, https://anonyviet.com/wp-content/uploads/2020/06/Picture26-300x59.png 300w" sizes="auto, (max-width: 500px) 100vw, 500px" title="Basic operations on Scene2D - Basic Godot Engine 65"/></p>
<ul>
<li>Green frame is Type Node (type of Node)</li>
<li>Pink: Node name</li>
<li>1: Node is on alert</li>
<li>2: Node is already using Signal (emitting a signal)</li>
<li>3: Node has been assigned a script</li>
<li>4: Node is locked for migration</li>
<li>5: Node has been locked to move its child nodes</li>
<li>6: Node being displayed in Scene 2D</li>
</ul>
<ul>
<li>
<h3 id="ftoc-viewport-2d-khung-nhin-2d" class="ftwp-heading">2D Viewport (2D Viewport)</h3>
</li>
</ul>
<p>– What is Viewport?</p>
<ul>
<li>The viewport roughly translates to the viewport, which is the user&#8217;s visible area of ​​the content in a game.</li>
<li>Viewport on 2D Scene:</li>
</ul>
<p><img decoding="async" loading="lazy" width="677" height="426" class="alignnone size-full wp-image-20163" src="https://anonyviet.com/wp-content/uploads/2020/06/Picture27-1.png" alt="Basic operations on Scene2D - Basic Godot Engine 58" srcset="https://anonyviet.com/wp-content/uploads/2020/06/Picture27-1.png 677w, https://anonyviet.com/wp-content/uploads/2020/06/Picture27-1-300x189.png 300w" sizes="auto, (max-width: 677px) 100vw, 677px" title="Basic operations on Scene2D - Basic Godot Engine 66"/></p>
<p>You can see the blue translucent border, which is Godot&#8217;s 2D Viewport frame.  The default resolution when creating the project is 1240×600.</p>
<ul>
<li>All objects seen when running the game must be placed in this view</li>
<li>The game&#8217;s root node has the default Type of Viewport</li>
</ul>
<p><img decoding="async" loading="lazy" width="555" height="258" class="alignnone size-full wp-image-20165" src="https://anonyviet.com/wp-content/uploads/2020/06/Picture28-1-1.png" alt="Basic operations on Scene2D - Basic Godot Engine 59" srcset="https://anonyviet.com/wp-content/uploads/2020/06/Picture28-1-1.png 555w, https://anonyviet.com/wp-content/uploads/2020/06/Picture28-1-1-300x139.png 300w" sizes="auto, (max-width: 555px) 100vw, 555px" title="Basic operations on Scene2D - Basic Godot Engine 67"/></p>
<ul>
<li>The top left corner of the default Viewport frame will coincide with the O . coordinate angle</li>
<li>The viewport will be different with different devices, and will be smaller on a mobile phone than on a computer screen.</li>
<li>So how can the game display well on devices?</li>
</ul>
<h4 id="ftoc-thiet-lap-viewport" class="ftwp-heading">Viewport settings</h4>
<ul>
<li>Change Viewport size (Screen size)</li>
</ul>
<p>– Most smartphones and laptops currently have FullHD screens.  So we will take FullHD as the standard (depending on you)</p>
<p><img decoding="async" loading="lazy" width="584" height="425" class="alignnone size-full wp-image-20166" src="https://anonyviet.com/wp-content/uploads/2020/06/Picture29-1.png" alt="Basic operations on Scene2D - Basic Godot Engine 60" srcset="https://anonyviet.com/wp-content/uploads/2020/06/Picture29-1.png 584w, https://anonyviet.com/wp-content/uploads/2020/06/Picture29-1-300x218.png 300w, https://anonyviet.com/wp-content/uploads/2020/06/Picture29-1-120x86.png 120w" sizes="auto, (max-width: 584px) 100vw, 584px" title="Basic operations on Scene2D - Basic Godot Engine 68"/></p>
<p style="text-align: center">Project -> Project settings</p>
<p><img decoding="async" loading="lazy" width="677" height="443" class="alignnone size-full wp-image-20168" src="https://anonyviet.com/wp-content/uploads/2020/06/Picture30-1.png" alt="Basic operations on Scene2D - Basic Godot Engine 61" srcset="https://anonyviet.com/wp-content/uploads/2020/06/Picture30-1.png 677w, https://anonyviet.com/wp-content/uploads/2020/06/Picture30-1-300x196.png 300w" sizes="auto, (max-width: 677px) 100vw, 677px" title="Basic operations on Scene2D - Basic Godot Engine 69"/></p>
<p>At Display -> Window.  Then set the resolution again to FullHD (1920×1080) 16:9.</p>
<p>– Please enable Hidpi for devices that support this mode for better display.</p>
<p><img decoding="async" loading="lazy" width="677" height="168" class="alignnone size-full wp-image-20169" src="https://anonyviet.com/wp-content/uploads/2020/06/Picture31-1.png" alt="Basic operations on Scene2D - Basic Godot Engine 62" srcset="https://anonyviet.com/wp-content/uploads/2020/06/Picture31-1.png 677w, https://anonyviet.com/wp-content/uploads/2020/06/Picture31-1-300x74.png 300w" sizes="auto, (max-width: 677px) 100vw, 677px" title="Basic operations on Scene2D - Basic Godot Engine 70"/></p>
<p>You can find the Hidpi item at Display -> Window</p>
<ul>
<li>Setting Viewport Scale</li>
</ul>
<p><img decoding="async" loading="lazy" width="677" height="168" class="alignnone size-full wp-image-20170" src="https://anonyviet.com/wp-content/uploads/2020/06/Picture33-1.png" alt="Basic operations on Scene2D - Basic Godot Engine 63" srcset="https://anonyviet.com/wp-content/uploads/2020/06/Picture33-1.png 677w, https://anonyviet.com/wp-content/uploads/2020/06/Picture33-1-300x74.png 300w" sizes="auto, (max-width: 677px) 100vw, 677px" title="Basic operations on Scene2D - Basic Godot Engine 71"/></p>
<p>Also at Display -> Window in project settings.  We find the section and set:</p>
<p>+ Mode is: 2d if you focus on gui design.  Viewport will support rendering with better resolution but not suitable for gui.</p>
<p>+ Aspect is:</p>
<ul>
<li>ignore: always fills when scaling the window</li>
<li>keep_wight: keep the horizontal ratio</li>
<li>keep_height: keep height ratio</li>
<li>keep: keep the whole screen ratio</li>
<li>expand: fills on screens of the same scale</li>
</ul>
<p>After the above viewport settings, your Game will display good content on devices.</p>
<p><strong>Note</strong>: Please set up the first viewport when starting to make the game!  To avoid display errors</p>
<p>– Set the rotation direction for devices with automatic rotation sensors:</p>
<p><img decoding="async" loading="lazy" width="677" height="242" class="alignnone size-full wp-image-20171" src="https://anonyviet.com/wp-content/uploads/2020/06/Picture34-1.png" alt="Basic operations on Scene2D - Basic Godot Engine 64" srcset="https://anonyviet.com/wp-content/uploads/2020/06/Picture34-1.png 677w, https://anonyviet.com/wp-content/uploads/2020/06/Picture34-1-300x107.png 300w" sizes="auto, (max-width: 677px) 100vw, 677px" title="Basic operations on Scene2D - Basic Godot Engine 72"/></p>
<p>At Display -> Window in Project settings.  Find the Handheld -> Orientation section.</p>
<ul>
<li>Choose landscape if the screen is rotated horizontally.</li>
<li>Choose portrait if the screen is rotated vertically</li>
<li>If the machine has an auto-rotate sensor, select the items with the sensor section.</li>
</ul>
<p><em>In today&#8217;s article, I have introduced and shared with you the basic operations on Scene2D on Godot Engine.  If you have any questions, please leave a comment or suggestion!  For more information, you can refer to the basic videos at https://www.youtube.com/playlist?list=PLOk8LhtEwUVn8e3RUfk-rX_RB3f9_ulYg.  Thank you for following this post!  🙂 </em></p>
<div class="kk-star-ratings kksr-auto kksr-align-right kksr-valign-bottom" data-payload="{&quot;align&quot;:&quot;right&quot;,&quot;id&quot;:&quot;20134&quot;,&quot;slug&quot;:&quot;default&quot;,&quot;valign&quot;:&quot;bottom&quot;,&quot;ignore&quot;:&quot;&quot;,&quot;reference&quot;:&quot;auto&quot;,&quot;class&quot;:&quot;&quot;,&quot;count&quot;:&quot;100&quot;,&quot;legendonly&quot;:&quot;&quot;,&quot;readonly&quot;:&quot;&quot;,&quot;score&quot;:&quot;5&quot;,&quot;starsonly&quot;:&quot;&quot;,&quot;best&quot;:&quot;5&quot;,&quot;gap&quot;:&quot;5&quot;,&quot;greet&quot;:&quot;\u0110\u00e1nh gi\u00e1 b\u00e0i vi\u1ebft post&quot;,&quot;legend&quot;:&quot;B\u00e0i vi\u1ebft \u0111\u1ea1t: 5\/5 - (100 b\u00ecnh ch\u1ecdn)&quot;,&quot;size&quot;:&quot;24&quot;,&quot;width&quot;:&quot;142.5&quot;,&quot;_legend&quot;:&quot;B\u00e0i vi\u1ebft \u0111\u1ea1t: {score}\/{best} - ({count} {votes})&quot;,&quot;font_factor&quot;:&quot;1.25&quot;}">
<p>            The article achieved: 5/5 &#8211; (100 votes)    </p>
</p></div>
</div>
]]></content:encoded>
					
					<wfw:commentRss>https://en.anonyviet.com/basic-operations-on-scene2d-basic-godot-engine/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<media:content url="https://anonyviet.com/wp-content/uploads/2020/06/Picture20-1.png" medium="image"></media:content>
	</item>
	</channel>
</rss>
