World & player basics

This commit is contained in:
Rob Kelly 2025-09-29 12:12:34 -06:00
parent d990b21734
commit 425fa30ed5
5 changed files with 49 additions and 0 deletions

View File

@ -0,0 +1 @@
uid://drvmixm5hd4cv

View File

@ -0,0 +1 @@
uid://c4qpamg7w3tpd

View File

@ -11,6 +11,7 @@ config_version=5
[application]
config/name="Megalith"
run/main_scene="uid://daxngklaqlyba"
config/features=PackedStringArray("4.5", "Forward Plus")
run/max_fps=60
@ -38,3 +39,11 @@ movie_writer/movie_file="demos/demo.avi"
[editor_plugins]
enabled=PackedStringArray("res://addons/format_on_save/plugin.cfg", "res://addons/gdlint_plugin/plugin.cfg")
[file_customization]
folder_colors={
"res://assets/": "red",
"res://src/": "green",
"res://src/world/": "teal"
}

13
src/player/player.tscn Normal file
View File

@ -0,0 +1,13 @@
[gd_scene load_steps=3 format=3 uid="uid://dtbulshrxetes"]
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_qnmj6"]
[sub_resource type="CapsuleMesh" id="CapsuleMesh_4anbu"]
[node name="Player" type="CharacterBody3D"]
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
shape = SubResource("CapsuleShape3D_qnmj6")
[node name="MeshInstance3D" type="MeshInstance3D" parent="."]
mesh = SubResource("CapsuleMesh_4anbu")

25
src/world/world.tscn Normal file
View File

@ -0,0 +1,25 @@
[gd_scene load_steps=5 format=3 uid="uid://daxngklaqlyba"]
[ext_resource type="PackedScene" uid="uid://dtbulshrxetes" path="res://src/player/player.tscn" id="1_1k4gi"]
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_kueii"]
albedo_color = Color(0.16, 0.16, 0.16, 1)
[sub_resource type="PlaneMesh" id="PlaneMesh_1k4gi"]
material = SubResource("StandardMaterial3D_kueii")
size = Vector2(16, 16)
[sub_resource type="WorldBoundaryShape3D" id="WorldBoundaryShape3D_1k4gi"]
[node name="World" type="Node3D"]
[node name="Player" parent="." instance=ExtResource("1_1k4gi")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0)
[node name="WorldFloor" type="MeshInstance3D" parent="."]
mesh = SubResource("PlaneMesh_1k4gi")
[node name="StaticBody3D" type="StaticBody3D" parent="WorldFloor"]
[node name="CollisionShape3D" type="CollisionShape3D" parent="WorldFloor/StaticBody3D"]
shape = SubResource("WorldBoundaryShape3D_1k4gi")