Collisions
Positions
There are local (node.position
) and global (node.global_position
) positions.
Resolution
Start at 360p. 2x is 720, 3x is 1080, 4x is 1440 and 6x is 2160
Animations
AnimationPlayer is powerful.
For one-off in-code simple animations tweens
can be used.
Tweens will be applied sequentially. If the desired behavior is for the to run in parallel, tween.set_parallel(true)
can be used.
Start value of the property affected by tween can be specified with .from()
, e.g.
twee.tween_property($Player, "modulate:a", 0, 2).from(0.5)
Speed of the transition can be specified with: .speed()
method, e.g.
twee.tween_property($Player, "modulate:a", 0, 2).speed(Tween.TRANS_QUAD)
Theme
To create a new theme RMK on explorer tab > New Resource > Theme
.
Theme can be specified on the node level or on the project level (gui/theme/custom
).
Variants for each type can be added https://www.youtube.com/watch?v=1_OFJLyqlXI&t=1569s.
Warnings, GUI documentation
_get_configuration_warnings()
can be used to display warnings similar to how Area2D
displays warning when no CollisionShape2D
attached to it. It allows to document the code without relying on the external documentation.
Source: https://docs.godotengine.org/en/stable/tutorials/best_practices/scene_organization.html
How to
- Auto load external changes (e.g. from VS Code)
Editor Settings:
text_editor/behavior/files/auto_reload_scripts_on_external_change
- Fix Godot.NET.SDK cannot be found Install https://learn.microsoft.com/en-us/dotnet/core/install/linux-fedora
- Fix slow godot language server in VSCode
Not sure if it’s actually a fix, but it got better with this VSCode setting:
godotTools.lsp.headless": true
- How to use VSCode as an external editor https://docs.godotengine.org/en/stable/tutorials/editor/external_editor.html
- How to flip a scene horizontally
Use negative
x
scale