scene manager + first scene + player

This commit is contained in:
2025-01-17 22:11:14 +01:00
parent e555f55e15
commit 148efcb388
5 changed files with 124 additions and 7 deletions

21
scene/player.tscn Normal file
View File

@@ -0,0 +1,21 @@
[gd_scene load_steps=3 format=3 uid="uid://c74354tlmcg6h"]
[ext_resource type="Script" path="res://script/player.gd" id="1_kjuyr"]
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_d8bnp"]
[node name="CharacterBody3D" type="CharacterBody3D" node_paths=PackedStringArray("head")]
script = ExtResource("1_kjuyr")
SENSI = 0.002
head = NodePath("head")
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
shape = SubResource("CapsuleShape3D_d8bnp")
[node name="head" type="Node3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.65, 0)
[node name="point_dir" type="Node3D" parent="head"]
transform = Transform3D(1, 7.81702e-05, -0.000170007, -7.81212e-05, 1, 0.000294683, 0.000170029, -0.00029467, 1, 0, 0, -1)
[node name="Camera3D" type="Camera3D" parent="head"]

View File

@@ -1,3 +1,27 @@
[gd_scene format=3 uid="uid://brc445tt624lb"]
[gd_scene load_steps=6 format=3 uid="uid://brc445tt624lb"]
[ext_resource type="Texture2D" uid="uid://pr42rnokdw6w" path="res://icon.svg" id="1_hg70h"]
[ext_resource type="PackedScene" uid="uid://c74354tlmcg6h" path="res://scene/player.tscn" id="1_ka8xa"]
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_2quhp"]
albedo_texture = ExtResource("1_hg70h")
[sub_resource type="PlaneMesh" id="PlaneMesh_2hvdi"]
size = Vector2(500, 500)
[sub_resource type="ConvexPolygonShape3D" id="ConvexPolygonShape3D_0l50f"]
points = PackedVector3Array(-250, 0, -250, -250, 0, 250, 250, 0, -250, 250, 0, 250)
[node name="walk_zone" type="Node3D"]
[node name="MeshInstance3D" type="MeshInstance3D" parent="."]
material_override = SubResource("StandardMaterial3D_2quhp")
mesh = SubResource("PlaneMesh_2hvdi")
[node name="StaticBody3D" type="StaticBody3D" parent="MeshInstance3D"]
[node name="CollisionShape3D" type="CollisionShape3D" parent="MeshInstance3D/StaticBody3D"]
shape = SubResource("ConvexPolygonShape3D_0l50f")
[node name="CharacterBody3D" parent="." instance=ExtResource("1_ka8xa")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -5.37761, 10.7052, 2.9378)