This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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): |