From a5bcedd5b2aee4be561b9438a0c02d37f2c68de5 Mon Sep 17 00:00:00 2001 From: Josh Creek <8179928+jcreek@users.noreply.github.com> Date: Wed, 21 Feb 2024 18:07:09 +0000 Subject: [PATCH] feat(#1): Create a match scene with a ball and a vehicle --- Game/scenes/match.tscn | 60 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 Game/scenes/match.tscn diff --git a/Game/scenes/match.tscn b/Game/scenes/match.tscn new file mode 100644 index 0000000..9809e3f --- /dev/null +++ b/Game/scenes/match.tscn @@ -0,0 +1,60 @@ +[gd_scene load_steps=9 format=3 uid="uid://djlfte5nx8sel"] + +[ext_resource type="Script" path="res://scripts/Vehicle.gd" id="1_xcj6u"] +[ext_resource type="Script" path="res://scripts/MatchCamera3D.gd" id="2_n3g6s"] + +[sub_resource type="BoxShape3D" id="BoxShape3D_xf0b8"] +size = Vector3(1, 0.5, 0.5) + +[sub_resource type="BoxMesh" id="BoxMesh_ox3jn"] +size = Vector3(1, 0.5, 0.5) + +[sub_resource type="SphereShape3D" id="SphereShape3D_c5p07"] + +[sub_resource type="SphereMesh" id="SphereMesh_uxjj0"] + +[sub_resource type="BoxShape3D" id="BoxShape3D_gyxf6"] +size = Vector3(50, 0.1, 50) + +[sub_resource type="BoxMesh" id="BoxMesh_vk12m"] +size = Vector3(50, 0.1, 50) + +[node name="MatchNode3D" type="Node3D"] + +[node name="Vehicle" type="RigidBody3D" parent="."] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 3.97288, 1.24949, 0.0115612) +mass = 10.0 +gravity_scale = 10.0 +script = ExtResource("1_xcj6u") + +[node name="CollisionShape3D" type="CollisionShape3D" parent="Vehicle"] +shape = SubResource("BoxShape3D_xf0b8") + +[node name="MeshInstance3D" type="MeshInstance3D" parent="Vehicle"] +mesh = SubResource("BoxMesh_ox3jn") + +[node name="Ball" type="RigidBody3D" parent="."] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -1.00382, 1.26061, 0) +mass = 10.0 + +[node name="CollisionShape3D" type="CollisionShape3D" parent="Ball"] +shape = SubResource("SphereShape3D_c5p07") + +[node name="MeshInstance3D" type="MeshInstance3D" parent="Ball"] +mesh = SubResource("SphereMesh_uxjj0") + +[node name="MatchCamera3D" type="Camera3D" parent="." node_paths=PackedStringArray("vehicle", "ball")] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 2.08165e-12, 2.08165e-12, 2.08165e-12) +current = true +fov = 114.877 +script = ExtResource("2_n3g6s") +vehicle = NodePath("../Vehicle") +ball = NodePath("../Ball") + +[node name="Floor" type="StaticBody3D" parent="."] + +[node name="CollisionShape3D" type="CollisionShape3D" parent="Floor"] +shape = SubResource("BoxShape3D_gyxf6") + +[node name="MeshInstance3D" type="MeshInstance3D" parent="Floor"] +mesh = SubResource("BoxMesh_vk12m")