gdo Flashcards
A Prefab in unity is called a
Scene in godot
The usual components of a player are
Animated Sprite, body, collider
res:// refers to
the base directory of the project
To get a component in a script, instead of using get_node you can also use
$NodeName
To create a scene
right click on the node and choose save node as scene
The root node is essentially a
viewport
Note: To change the viewports values go to
project -> project settings -> display -> window
To add resources to your file system
right click in file system -> show in file manager
and drag the resources into that folder that pops up
A sprite node automatically inherits all the
functionality of a Node2D
To give a sprite an image you must drag the image
into its texture field
Note: An image with multiple images together that form an animation uses the “Atlas Texture”
Note: If you want an animation, this needs to be an animated sprite
In godot the pivot point field is called the
offset
To add a new script to a node
right click -> attach script
To get the x and y lengths of the viewport, type
get_viewport().size.x
get_viewport.seize.y
To change the main scene (scene that renders when you press play)
Project -> Project Settings -> Application -> Run -> Main Scene
To set the position of using a vector, type
Vector2(x, y)
To rotate a node from a script, type
rotate(deg2rad(90))