fix(*): Ensure that movement vaguely works in the new area and looks vaguely at the ball

This commit is contained in:
Josh Creek
2025-07-12 20:34:03 +01:00
parent 927bbd0be7
commit bdd0244873
9 changed files with 143 additions and 33 deletions
+5 -20
View File
@@ -1,7 +1,7 @@
[gd_scene load_steps=14 format=3 uid="uid://djlfte5nx8sel"]
[gd_scene load_steps=13 format=3 uid="uid://djlfte5nx8sel"]
[ext_resource type="PackedScene" uid="uid://dnra1buk328d" path="res://objects/vehicle.tscn" id="2_2d4ji"]
[ext_resource type="ArrayMesh" uid="uid://ucw1lyo43yi4" path="res://assets/models/gold_ball.res" id="2_4bpxj"]
[ext_resource type="PackedScene" uid="uid://27u3tdc5yqnl" path="res://objects/ball.tscn" id="2_mv342"]
[ext_resource type="Script" uid="uid://scnbnslvru0b" path="res://scripts/MatchCamera3D.gd" id="2_n3g6s"]
[ext_resource type="PackedScene" uid="uid://cofdcxo5170rs" path="res://objects/goal.tscn" id="3_xk008"]
[ext_resource type="Script" uid="uid://cprbkhe46c1be" path="res://scripts/player1.gd" id="4_keuru"]
@@ -17,8 +17,6 @@ size = Vector3(10, 0.5, 10)
[sub_resource type="BoxShape3D" id="BoxShape3D_133xi"]
size = Vector3(10, 0.5, 10)
[sub_resource type="SphereShape3D" id="SphereShape3D_c5p07"]
[sub_resource type="ProceduralSkyMaterial" id="ProceduralSkyMaterial_t0i0j"]
sky_top_color = Color(0.266667, 0.419608, 1, 1)
@@ -31,13 +29,12 @@ sky = SubResource("Sky_0r58b")
[node name="MatchNode3D" type="Node3D"]
[node name="MatchCamera3D" type="Camera3D" parent="." node_paths=PackedStringArray("vehicle", "ball")]
[node name="MatchCamera3D" type="Camera3D" parent="." node_paths=PackedStringArray("vehicle")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 2.08165e-12, 1.33585, 3.3972)
current = true
fov = 114.877
script = ExtResource("2_n3g6s")
vehicle = NodePath("../Players/GridContainer/SubViewportContainer/SubViewport/Player1")
ball = NodePath("../Ball")
[node name="DirectionalLight3D" type="DirectionalLight3D" parent="."]
transform = Transform3D(0.908048, -0.417905, 0.0283578, 0.372456, 0.836559, 0.401802, -0.191638, -0.354294, 0.915287, 0, 3.7388, 0.115907)
@@ -52,18 +49,8 @@ mesh = SubResource("BoxMesh_xotuo")
[node name="CollisionShape3D" type="CollisionShape3D" parent="Floor"]
shape = SubResource("BoxShape3D_133xi")
[node name="Ball" type="RigidBody3D" parent="."]
[node name="Ball" parent="." instance=ExtResource("2_mv342")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 2.08165e-12, 2, 2.08165e-12)
mass = 100.0
inertia = Vector3(100, 100, 100)
metadata/_edit_group_ = true
[node name="CollisionShape3D" type="CollisionShape3D" parent="Ball"]
shape = SubResource("SphereShape3D_c5p07")
[node name="MeshInstance3D" type="MeshInstance3D" parent="Ball"]
transform = Transform3D(0.5, 0, 0, 0, 0.5, 0, 0, 0, 0.5, 2.08165e-12, 2.08165e-12, 2.08165e-12)
mesh = ExtResource("2_4bpxj")
[node name="Players" type="Node3D" parent="."]
@@ -103,10 +90,8 @@ script = ExtResource("4_vutck")
[node name="Goals" type="Node3D" parent="."]
[node name="Goal2" parent="Goals" node_paths=PackedStringArray("ball", "player1") instance=ExtResource("3_xk008")]
[node name="Goal2" parent="Goals" instance=ExtResource("3_xk008")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 2.08165e-12, 1, -5)
ball = NodePath("../../Ball")
player1 = NodePath("../../Players/GridContainer/SubViewportContainer/SubViewport/Player1")
[node name="WorldEnvironment" type="WorldEnvironment" parent="."]
environment = SubResource("Environment_ycxte")