From 0ebd3f2de32120128cd7b28e694acbc6a4bf8d5f Mon Sep 17 00:00:00 2001 From: Matthew Welch Date: Sun, 29 Sep 2024 19:10:44 -0700 Subject: [PATCH] Fix error with moving marker Fix rotation on ramp tile --- Tiles/TileRamp1.tscn | 11 ++++++----- world.gd | 2 -- world.tscn | 2 +- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/Tiles/TileRamp1.tscn b/Tiles/TileRamp1.tscn index dbfef3e..1037020 100644 --- a/Tiles/TileRamp1.tscn +++ b/Tiles/TileRamp1.tscn @@ -13,30 +13,31 @@ size = Vector2(2, 10) [sub_resource type="Curve3D" id="Curve3D_q1k88"] _data = { -"points": PackedVector3Array(0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, -5), +"points": PackedVector3Array(0, 0, 0, 0, 0, 0, 0, -2.40419, 3.96713, 0, 0, 0, 0, 0, 0, 0, 2.60463, -4.68416), "tilts": PackedFloat32Array(0, 0) } point_count = 2 [node name="Tile1" type="Node3D"] -transform = Transform3D(1, 0, 0, 0, 0.866025, -0.5, 0, 0.5, 0.866025, 0, 0, 0) +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0) [node name="Floor" type="MeshInstance3D" parent="."] +transform = Transform3D(1, 0, 0, 0, 0.866025, -0.5, 0, 0.5, 0.866025, 0, 0.0893164, -0.333333) mesh = SubResource("PlaneMesh_jju0s") [node name="Wall1" type="MeshInstance3D" parent="."] -transform = Transform3D(-4.37114e-08, 1, 0, -1, -4.37114e-08, 0, 0, 0, 1, -5, 1, 0) +transform = Transform3D(-4.37114e-08, 1, 0, -0.866025, -3.78552e-08, -0.5, -0.5, -2.18557e-08, 0.866025, -5, 0.955342, 0.166667) mesh = SubResource("PlaneMesh_rsriu") [node name="Wall2" type="MeshInstance3D" parent="."] -transform = Transform3D(-4.37114e-08, 1, 0, -1, -4.37114e-08, 0, 0, 0, 1, 5, 1, 0) +transform = Transform3D(-4.37114e-08, 1, 0, -0.866025, -3.78552e-08, -0.5, -0.5, -2.18557e-08, 0.866025, 5, 0.955342, 0.166667) mesh = SubResource("PlaneMesh_rsriu") [node name="Path3D" type="Path3D" parent="."] curve = SubResource("Curve3D_q1k88") [node name="PathFollow3D" type="PathFollow3D" parent="Path3D"] -transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 5) +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -2.40419, 3.96713) rotation_mode = 1 loop = false tilt_enabled = false diff --git a/world.gd b/world.gd index 9e51e38..485f48d 100644 --- a/world.gd +++ b/world.gd @@ -1,7 +1,6 @@ extends Node3D @onready var path: Path3D = $Path -@onready var marker: Marker3D = $Path/Follow/Marker @onready var character: Character = $Character var change_distance: float @@ -24,6 +23,5 @@ func _process(delta: float) -> void: current_path += 1 if current_path >= paths.size(): return - marker.reparent(paths[current_path]) character.path = paths[current_path] change_distance = paths[current_path].curve.get_baked_length() diff --git a/world.tscn b/world.tscn index b255dd3..bc7cb15 100644 --- a/world.tscn +++ b/world.tscn @@ -20,7 +20,7 @@ transform = Transform3D(-0.827728, -0.0513662, 0.558773, 0.136568, 0.947417, 0.2 transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -10) [node name="Tile3" parent="." instance=ExtResource("4_uxk3v")] -transform = Transform3D(1, 0, 0, 0, 0.866025, -0.5, 0, 0.5, 0.866025, 0, 2.49484, -19.3201) +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2.49484, -19.3201) [node name="Tile4" parent="." instance=ExtResource("3_vddfn")] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 5, -28.6473)