Godot
Table of Contents
Exporting
From https://docs.godotengine.org/en/stable/tutorials/rendering/multiple_resolutions.html:
- Use stretch mode = viewport for pixel games
3D
- Get size of a mesh with
get_aabb()
https://godotengine.org/qa/44825/is-there-a-way-to-get-the-size-of-a-3d-mesh
Connections
Connecting via UI:
Adds the following to the scene file:
+[connection signal="health_changed" from="Characters/Player" to="GUI" method="_on_Player_health_changed"]
Or you can do it programmatically with something like:
# Adds a listener on the mob instance for the event "start_game", hooking into mob._on_start_game
$Hud.connect("start_game", mob, "_on_start_game")
Cameras
Prefer using an interpolated camera. To achieve a spatial offset, create an invisible spatial node and get the camera to follow that instead (https://youtu.be/j2wBsb-W3Ls?t=397). Tweak rotation on camera first, then copy rotation values onto the camera target.
Importing from Blender
- To update
.gltf
files, untick 'Keep on Reimport' to make sure imports keep updating (https://www.youtube.com/watch?v=grPbk-bfMO4) - Import 3D Models from Blender into Godot: https://www.youtube.com/watch?v=Q-G8evhxHmc
- When importing multiple objects in a
.blend
file, go to Import → Import As → Presets → Import with Separate Objects
- When importing multiple objects in a
Exporting from Blender
Use export as GLTF (more up to date than Collada).
- To apply modifiers, Geometry → Apply Modifiers
Bindings
<C-b>
to build- In the stage, press
<Space>
to pan F6
to play sceneF5
to play project<S-F1>
to look up scripting documentation
Custom
<C-p>
for project settings
References
- Shader examples (glow, shadow etc.) https://godotengine.org/asset-library/asset/522