• Home
  • News
  • Software
  • Knowledge
  • MMO
  • Tips
  • Security
  • Network
  • Office
AnonyViet - English Version
  • Home
  • News
  • Software
  • Knowledge
  • MMO
  • Tips
  • Security
  • Network
  • Office
No Result
View All Result
  • Home
  • News
  • Software
  • Knowledge
  • MMO
  • Tips
  • Security
  • Network
  • Office
No Result
View All Result
AnonyViet - English Version
No Result
View All Result

Basic operations on Scene2D – Basic Godot Engine

AnonyViet by AnonyViet
February 1, 2023
in Tips
0

Hi! Hello friends! Today’s post, I continue to share with you Basic operations on Scene2D (a 2-dimensional workspace window) on Godot Engine! No more roundabouts, let’s go to the article! Let’s go!

Join the channel Telegram of the AnonyViet 👉 Link 👈

SCENE2D WORKING WINDOWS

To work on the Scene 2D window, we choose to enter the 2D Mode:Basic operations on Scene2D

Then we will see the Scene 2D working window as follows:

how to use Scene2D godot engine

– At the top is the name Scene

– Below is the toolbar to manipulate the objects in the Scene

– Below is the main working screen of a Scene including:

+ Coordinate axis Oxy

+ Viewport 2D (2D viewport)

Oxygen coordinate axis (on Godot Engine)

– A line of two perpendicular lines intersecting at a point O (O is taken as the center and is called the coordinate angle)

+ 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

(-oo;+oo)

+ 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.

+ The unit of coordinate angle O is (0,0)

Scene2D user manual

  • 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)

– For example, we bring some object A to this Oxy coordinate system. Suppose Basic operations on Scene2D - Basic Godot Engine 34is an object. Then we bring Basic operations on Scene2D - Basic Godot Engine 35into the Oxygen system, it will generate a position (position), a size (scale) corresponding to the system of type Vector2(x unit, y unit)

– Vector2 is a data type representing locations in 2D space

Basic operations on Scene2D - Basic Godot Engine 36

– The position of Godot on the x-axis is 5 units, on the y-axis is 0 units to the center of the object

– 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.

– We can briefly represent the position and size of Godot by Vecto2() as follows:

#Godot.position = Vecto2(5,0)

#Godot.scale = Vecto2(2,2)

Objects can rotate their center (rotation)

Basic operations on Scene2D - Basic Godot Engine 37

We have A, B, C with each different rotation in degrees (0->360°)

– We can change the position, scale, rotation_degree in the Transform section of the object’s properties (Inspector).

Basic operations on Scene2D - Basic Godot Engine 38

Stackable objects (Zindex)

Basic operations on Scene2D - Basic Godot Engine 39

Because we are using 2D Mode, we can’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.

Basic operations on Scene2D - Basic Godot Engine 40

You can find the Zindex in the properties section of Node.

Objects can change their appearance (Visiblity)

  • Show and hide (visible)

Basic operations on Scene2D - Basic Godot Engine 41

Godot is showing

Can hide/show objects through Node’s eye icon (if any).

Basic operations on Scene2D - Basic Godot Engine 42

Godot is hidden

Basic operations on Scene2D - Basic Godot Engine 43

Godot is showing

CanvasItem

  • Nodes displayed in the 2D Mode window are called a CanvasItem

Basic operations on Scene2D - Basic Godot Engine 44

Illustration 3 CanvasItem

Operations on CanvasItem

– Select a CanvasItem (Select Mode)

Basic operations on Scene2D - Basic Godot Engine 45

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.

Basic operations on Scene2D - Basic Godot Engine 46

You can also select multiple CanvasItems using the key combinations available on the HDH you are using. (Similar to selecting multiple files).

Basic operations on Scene2D - Basic Godot Engine 47

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.

  • Resize CanvasItem

Basic operations on Scene2D - Basic Godot Engine 48

In select mode. You click and hold the red dots around the object and drag and drop. This will change the scale . value

Basic operations on Scene2D - Basic Godot Engine 49

Or you can drag the x, y scale axes in scale mode.

Basic operations on Scene2D - Basic Godot Engine 50

In Rotate Mode, click and hold on the object and drag it around.

  • Change the center of the CanvasItem (pivot).

Basic operations on Scene2D - Basic Godot Engine 51

Select the Change rotation pivot mode -> Click and hold the position icon on the CanvasItem and drag and drop to the desired position.

  • Change the CasvaItem’s view position

Basic operations on Scene2D - Basic Godot Engine 52

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.

  • Measure CanvasItem size.

Basic operations on Scene2D - Basic Godot Engine 53

Select the Ruler Mode (triangle), lick and drag the areas to be measured.

  • CanvasItem Move Lock

Basic operations on Scene2D - Basic Godot Engine 54

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.

Basic operations on Scene2D - Basic Godot Engine 55

Or you can lock all child Nodes of the object by clicking Lock object’s children.

  • Set smart location by snapping

Basic operations on Scene2D - Basic Godot Engine 56

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.

Note: Observe the settings for Node

Basic operations on Scene2D - Basic Godot Engine 57

  • Green frame is Type Node (type of Node)
  • Pink: Node name
  • 1: Node is on alert
  • 2: Node is already using Signal (emitting a signal)
  • 3: Node has been assigned a script
  • 4: Node is locked for migration
  • 5: Node has been locked to move its child nodes
  • 6: Node being displayed in Scene 2D
  • 2D Viewport (2D Viewport)

– What is Viewport?

  • The viewport roughly translates to the viewport, which is the user’s visible area of ​​the content in a game.
  • Viewport on 2D Scene:

Basic operations on Scene2D - Basic Godot Engine 58

You can see the blue translucent border, which is Godot’s 2D Viewport frame. The default resolution when creating the project is 1240×600.

  • All objects seen when running the game must be placed in this view
  • The game’s root node has the default Type of Viewport

Basic operations on Scene2D - Basic Godot Engine 59

  • The top left corner of the default Viewport frame will coincide with the O . coordinate angle
  • The viewport will be different with different devices, and will be smaller on a mobile phone than on a computer screen.
  • So how can the game display well on devices?

Viewport settings

  • Change Viewport size (Screen size)

– Most smartphones and laptops currently have FullHD screens. So we will take FullHD as the standard (depending on you)

Basic operations on Scene2D - Basic Godot Engine 60

Project -> Project settings

Basic operations on Scene2D - Basic Godot Engine 61

At Display -> Window. Then set the resolution again to FullHD (1920×1080) 16:9.

– Please enable Hidpi for devices that support this mode for better display.

Basic operations on Scene2D - Basic Godot Engine 62

You can find the Hidpi item at Display -> Window

  • Setting Viewport Scale

Basic operations on Scene2D - Basic Godot Engine 63

Also at Display -> Window in project settings. We find the section and set:

+ Mode is: 2d if you focus on gui design. Viewport will support rendering with better resolution but not suitable for gui.

+ Aspect is:

  • ignore: always fills when scaling the window
  • keep_wight: keep the horizontal ratio
  • keep_height: keep height ratio
  • keep: keep the whole screen ratio
  • expand: fills on screens of the same scale

After the above viewport settings, your Game will display good content on devices.

Note: Please set up the first viewport when starting to make the game! To avoid display errors

– Set the rotation direction for devices with automatic rotation sensors:

Basic operations on Scene2D - Basic Godot Engine 64

At Display -> Window in Project settings. Find the Handheld -> Orientation section.

  • Choose landscape if the screen is rotated horizontally.
  • Choose portrait if the screen is rotated vertically
  • If the machine has an auto-rotate sensor, select the items with the sensor section.

In today’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! 🙂

The article achieved: 5/5 – (100 votes)

Tags: BasicEngineGodotoperationsScene2D
Previous Post

[DDOS] XMLRPC – Script DDos

Next Post

Instructions on how to jailbreak iOS 13 with Checkra1n

AnonyViet

AnonyViet

Related Posts

4 ways to fix bluetooth connectivity on Windows 11
Tips

4 ways to fix bluetooth connectivity on Windows 11

August 8, 2025
How to know the computer is tracked and processed by Keylogger
Tips

How to know the computer is tracked and processed by Keylogger

August 7, 2025
Opal: Create applications who do not need to write code
Tips

Opal: Create applications who do not need to write code

August 3, 2025
How to activate a new Start menu on Windows 11
Tips

How to activate a new Start menu on Windows 11

July 29, 2025
Intellgpt: AI tool for osint and data science
Tips

Intellgpt: AI tool for osint and data science

July 28, 2025
How to create Google Ai Pro 12 months free with Indian student account
Tips

How to create Google Ai Pro 12 months free with Indian student account

July 27, 2025
Next Post
Instructions on how to jailbreak iOS 13 with Checkra1n

Instructions on how to jailbreak iOS 13 with Checkra1n

0 0 votes
Article Rating
Subscribe
Login
Notify of
guest

guest

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments

Recent News

Online driving exam preparation: Support theory and practice

Online driving exam preparation: Support theory and practice

August 15, 2025
How to add application to your favorite bar

How to add application to your favorite bar

August 14, 2025
Wowhay.com – The door opens the world of modern knowledge and network culture

Wowhay.com – The door opens the world of modern knowledge and network culture

August 13, 2025
Instructions on how to fix Screen Time Limited Reached on RoBlox

Instructions on how to fix Screen Time Limited Reached on RoBlox

August 13, 2025
Online driving exam preparation: Support theory and practice

Online driving exam preparation: Support theory and practice

August 15, 2025
How to add application to your favorite bar

How to add application to your favorite bar

August 14, 2025
Wowhay.com – The door opens the world of modern knowledge and network culture

Wowhay.com – The door opens the world of modern knowledge and network culture

August 13, 2025
AnonyViet - English Version

AnonyViet

AnonyViet is a website share knowledge that you have never learned in school!

We are ready to welcome your comments, as well as your articles sent to AnonyViet.

Follow Us

Contact:

Email: anonyviet.com[@]gmail.com

Main Website: https://anonyviet.com

Recent News

Online driving exam preparation: Support theory and practice

Online driving exam preparation: Support theory and practice

August 15, 2025
How to add application to your favorite bar

How to add application to your favorite bar

August 14, 2025
  • Home
  • Home 2
  • Home 3
  • Home 4
  • Home 5
  • Home 6
  • Next Dest Page
  • Sample Page

©2024 AnonyVietFor Knowledge kqxs hôm nay xem phim miễn phí mm88 8XBET mm88 trang chủ new88

No Result
View All Result
  • Home
  • News
  • Software
  • Knowledge
  • MMO
  • Tips
  • Security
  • Network
  • Office

©2024 AnonyVietFor Knowledge kqxs hôm nay xem phim miễn phí mm88 8XBET mm88 trang chủ new88

wpDiscuz
0
0
Would love your thoughts, please comment.x
()
x
| Reply