Skip to content

Instantly share code, notes, and snippets.

@pwab
Last active January 19, 2023 22:16
Show Gist options
  • Save pwab/c57fdf86147831ccc4248073d80f3e36 to your computer and use it in GitHub Desktop.
Save pwab/c57fdf86147831ccc4248073d80f3e36 to your computer and use it in GitHub Desktop.
Godot Snippets
Just some Snippets for Godot 4.x
# This creates a "screenshot" of the current 3D-Node
# and exports it as a glTF 2.0 file including meshes,
# materials, lightning and animations
var path = "user://world.glb"
var document = GLTFDocument.new()
var state = GLTFState.new()
document.append_from_scene(self, state)
document.write_to_filesystem(state, path)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment