Fix error with moving marker

Fix rotation on ramp tile
This commit is contained in:
Matthew Welch 2024-09-29 19:10:44 -07:00
parent 7819007b01
commit 0ebd3f2de3
3 changed files with 7 additions and 8 deletions

View File

@ -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

View File

@ -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()

View File

@ -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)