Skip to content

Instantly share code, notes, and snippets.

@iRadEntertainment
iRadEntertainment / trail.gd
Created January 30, 2018 23:00
Godot Engine (GDscript) - 2D adjustable trail by Yellatch Games
#Draw trails with lines
#A NON-PERFECT SCRIPT FOR Godot v2.1.* *NOTE THIS SCRIPT STILL HAVE SOME REF ISSUES, CHECK FOR ERRORS IN THE DEBUGGER
#This script has to be attached to scene with only a Control Node
#This scene can be instanced as child of a moving node
#after that the code can be initialized calling scia_setup() func:
#arguments ( nuovo_oggetto = "the parent node reference goes here"
num_step = "number of steps (50 by default)
nuovo_colore = Color() (Opaque white by default)
nuova_trasp = Initial alpha transparency (adjust the formula for other fading effects)
@Hodes
Hodes / trail.gd
Created August 10, 2017 19:54
Godot Simple Trail Parcticle
extends Node2D
export(int) var track_length = 10
export(int) var update_delay_frames = 0
var track_delay_counter = 0
var track = Vector2Array()
func _ready():
var pos = get_global_transform().get_origin()
for i in range(self.track_length):