pixelart
godot vectors
gdscript
2D
godot 3D
helper methods
global scope
https://docs.godotengine.org/en/stable/classes/class_@globalscope.html#methods
printrandi() % 50(random number 0-49)printerrdeg_to_rad(convert degrees to radians)ease
node
get_nodeget_childrenget_parentqueue_freeprint_treeget_viewport
wayland
To enable Wayland support currently:
- Run Godot on the command line with --display-driver wayland (note that such argument is not passed between instances, e.g. from the project manager to the editor or from the editor to running the game).
- For the editor, enable the run/platforms/linuxbsd/prefer_wayland editor setting (again, this will only affect the editor, not the game).
- For the game, set the display/display_server/driver.linux project setting to wayland.
vim mode
https://github.com/joshnajera/godot-vim
Alternatively, you can just use vim itself with the godot lsp.
lsp
You can use godot as an LSP server for gdscript. It works smoothly with neovim's lsp client and probably most others.
nvim_lsp.gdscript.setup {
on_attach = on_attach,
capabilities = capabilities
}
misc tips
PhysicsBody
- Kinematic: Control movement with our own code.
- Rigid: Control with physics engine.
- Static: Objects that wont be moved (but can be collided with.)