Skip to content

Instantly share code, notes, and snippets.

@saward
saward / godot_recursive_move.gd
Last active July 15, 2022 05:46
Example of Godot path movement using recursion
# MIT licenced. Feel free to use in your project.
# Use recursion to move along path. We move along path, and if there's any
# distance remaining, we call this function again and move further along until
# we reach our destination or there's no distance left to travel
func move_along_path(distance : float) -> void:
# Ensure we have an actual path, otherwise we are done and can stop
# processing
if path.size() == 0:
set_process(false)
return
@nemotoo
nemotoo / .gitattributes
Last active May 18, 2024 08:08
.gitattributes for Unity3D with git-lfs
## Unity ##
*.cs diff=csharp text
*.cginc text
*.shader text
*.mat merge=unityyamlmerge eol=lf
*.anim merge=unityyamlmerge eol=lf
*.unity merge=unityyamlmerge eol=lf
*.prefab merge=unityyamlmerge eol=lf