basic camera movement and textures update

This commit is contained in:
Nikolai Fesenko
2025-08-12 22:48:21 +02:00
parent 83095a0b8d
commit 37e0aa1a3e
15 changed files with 131 additions and 85 deletions

View File

@@ -1,21 +1,9 @@
[gd_scene load_steps=12 format=3 uid="uid://bj7y7q2qkpnci"]
[gd_scene load_steps=8 format=3 uid="uid://bj7y7q2qkpnci"]
[ext_resource type="ArrayMesh" uid="uid://622ethh2pdfa" path="res://Blends/road/road.obj" id="4_jjvhh"]
[ext_resource type="Texture2D" uid="uid://h1bl3q1pjjnm" path="res://Blends/textures/snow_02_rough_4k.jpg" id="5_21xkr"]
[ext_resource type="ArrayMesh" uid="uid://ws8ddp6stf3s" path="res://Blends/ground.obj" id="6_6bp64"]
[ext_resource type="PackedScene" uid="uid://dim2geqhn6d35" path="res://Scenes/Prefabs/cart.tscn" id="6_21xkr"]
[ext_resource type="PackedScene" uid="uid://dy03tqug33fep" path="res://Blends/ground.blend" id="6_344ge"]
[ext_resource type="Script" uid="uid://drrp1k2q71hq2" path="res://Scripts/camera_3d.gd" id="7_6bp64"]
[ext_resource type="PackedScene" uid="uid://bnikfigm0lp5q" path="res://Blends/Mobel/DoubleBeds.glb" id="8_344ge"]
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_344ge"]
albedo_texture = ExtResource("5_21xkr")
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_ynf5e"]
albedo_texture = ExtResource("5_21xkr")
metallic = 0.31
[sub_resource type="BoxShape3D" id="BoxShape3D_jjvhh"]
size = Vector3(172.382, 1, 159.805)
[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_21xkr"]
lifetime_randomness = 0.55
@@ -28,6 +16,8 @@ scale_min = 0.0
[sub_resource type="QuadMesh" id="QuadMesh_21xkr"]
size = Vector2(0.5, 0.5)
[sub_resource type="BoxShape3D" id="BoxShape3D_21xkr"]
[node name="Node3D" type="Node3D"]
[node name="DirectionalLight3D" type="DirectionalLight3D" parent="."]
@@ -43,42 +33,6 @@ skeleton = NodePath("../Road")
transform = Transform3D(10.9512, 0, 0, 0, 1, 0, 0, 0, 1, -53.9758, 37.1737, -62.1734)
mesh = ExtResource("4_jjvhh")
[node name="Ground2" type="MeshInstance3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 180.354, 36.969, -59.426)
material_override = SubResource("StandardMaterial3D_344ge")
mesh = ExtResource("6_6bp64")
skeleton = NodePath("../Ground")
surface_material_override/0 = SubResource("StandardMaterial3D_ynf5e")
[node name="StaticBody3D" type="StaticBody3D" parent="Ground2"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 13.9207, -0.00321198, -0.742706)
[node name="CollisionShape3D" type="CollisionShape3D" parent="Ground2/StaticBody3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.167175, 0, -0.376099)
shape = SubResource("BoxShape3D_jjvhh")
[node name="Ground" type="MeshInstance3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 20.3213, 36.9694, -59.4263)
material_override = SubResource("StandardMaterial3D_344ge")
mesh = ExtResource("6_6bp64")
[node name="StaticBody3D" type="StaticBody3D" parent="Ground"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 13.9207, -0.00321198, -0.742706)
[node name="CollisionShape3D" type="CollisionShape3D" parent="Ground/StaticBody3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -6.57438, 0, -0.376099)
shape = SubResource("BoxShape3D_jjvhh")
[node name="Camera3D" type="Camera3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 0.710217, 0.703983, 0, -0.703983, 0.710217, -16.0276, 52.362, -52.6538)
script = ExtResource("7_6bp64")
rayLength = 1000.0
[node name="DebugLabel1" type="Label" parent="Camera3D"]
offset_right = 40.0
offset_bottom = 23.0
text = "Text"
[node name="GPUParticles3D" type="GPUParticles3D" parent="."]
transform = Transform3D(3.70763, 0, 0, 0, 2.24982, 0, 0, 0, 3.71542, -7.77808, 47.2887, -60.0289)
emitting = false
@@ -95,9 +49,42 @@ light_energy = 1.162
spot_range = 23.417
spot_angle = 89.99
[node name="DoubleBeds" parent="." instance=ExtResource("8_344ge")]
transform = Transform3D(-0.00574796, 0, -1.00041, 0, 1, 0, 0.930317, 0, -0.00618104, -6.7791, 40.4211, -61.7192)
[node name="Cart" parent="." node_paths=PackedStringArray("mainCamera") instance=ExtResource("6_21xkr")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -8.31428, 39.9268, -60.2323)
mainCamera = NodePath("../Camera3D")
mainCamera = NodePath("../RigidBody3D/Camera3D")
[node name="RigidBody3D" type="RigidBody3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -8.05618, 41.42, -58.2918)
collision_layer = 128
collision_mask = 128
axis_lock_angular_x = true
axis_lock_angular_z = true
mass = 0.001
gravity_scale = 0.0
[node name="Camera3D" type="Camera3D" parent="RigidBody3D" node_paths=PackedStringArray("ownRigidBody", "endZoom")]
transform = Transform3D(1, 0, 0, 0, 0.710217, 0.703983, 0, -0.703983, 0.710217, 0, 17.894, 13.2384)
current = true
script = ExtResource("7_6bp64")
rayLength = 1000.0
camera_speed = 2.0
ownRigidBody = NodePath("..")
endZoom = NodePath("../endZoom")
[node name="DebugLabel1" type="Label" parent="RigidBody3D/Camera3D"]
offset_right = 40.0
offset_bottom = 23.0
text = "Text"
[node name="endZoom" type="Node3D" parent="RigidBody3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 41.2007, 42.2133)
[node name="CollisionShape3D" type="CollisionShape3D" parent="RigidBody3D"]
shape = SubResource("BoxShape3D_21xkr")
debug_color = Color(0.895552, 0, 0.381247, 1)
[node name="ground" parent="." instance=ExtResource("6_344ge")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 20.3213, 36.9694, -59.4263)
[node name="ground2" parent="." instance=ExtResource("6_344ge")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 180.354, 36.969, -59.426)