[gd_scene load_steps=6 format=2] [ext_resource path="res://Assets/topdown-player.svg" type="Texture" id=2] [ext_resource path="res://Trail/Trail2D.tscn" type="PackedScene" id=3] [sub_resource type="GDScript" id=1] script/source = "extends Node2D export var speed := 300.0 var _direction := Vector2.RIGHT func _process(delta: float) -> void: _direction = global_position.direction_to(get_global_mouse_position()) rotation = _direction.angle() translate((_direction * speed) * delta) " [sub_resource type="Curve" id=2] _data = [ Vector2( 0, 0 ), 0.0, 1.0, 0, 1, Vector2( 1, 1 ), 1.0, 0.0, 1, 0 ] [sub_resource type="Gradient" id=3] colors = PoolColorArray( 0.294118, 0.356863, 0.670588, 0, 0.294118, 0.356863, 0.670588, 1 ) [node name="ShipWithTrail" type="Node2D"] position = Vector2( 511.602, 297.63 ) script = SubResource( 1 ) speed = 600.0 [node name="Sprite" type="Sprite" parent="."] rotation = 1.5708 scale = Vector2( 0.7, 0.7 ) texture = ExtResource( 2 ) [node name="Camera2D" type="Camera2D" parent="."] rotation = -1.5708 current = true [node name="Trail2D" parent="." instance=ExtResource( 3 )] position = Vector2( -15.8954, -0.198364 ) rotation = 1.57079 z_index = -1 points = PoolVector2Array( -0.589685, 44.7556, -0.0901849, 0.300196 ) width = 45.0 width_curve = SubResource( 2 ) gradient = SubResource( 3 ) begin_cap_mode = 2 end_cap_mode = 2 is_emitting = true target_path = NodePath("../../ShipWithTrail")