Improved camera

This commit is contained in:
2024-02-10 00:10:51 +01:00
parent c3812dd54e
commit da869e0185
10 changed files with 194 additions and 114 deletions

View File

@ -12,6 +12,7 @@
[ext_resource type="Script" path="res://network/PlayerJump.gd" id="9_o8sk8"]
[ext_resource type="Script" path="res://network/Chat.gd" id="10_y3len"]
[ext_resource type="Script" path="res://world/Sun.gd" id="11_4jb08"]
[ext_resource type="PackedScene" uid="uid://cpdoq0oh84mfw" path="res://camera/Camera.tscn" id="12_aljdh"]
[ext_resource type="Environment" uid="uid://dixa0yso2s1u3" path="res://world/Environment.tres" id="12_cscto"]
[ext_resource type="PackedScene" uid="uid://hnn0n1xc2qt7" path="res://assets/tree/Tree.blend" id="14_7jtdl"]
[ext_resource type="CameraAttributesPractical" uid="uid://b835orxyqq6w5" path="res://world/CameraPractical.tres" id="15_6h2nx"]
@ -19,7 +20,6 @@
[ext_resource type="Script" path="res://world/PlayerManager.gd" id="16_dp6bj"]
[ext_resource type="PackedScene" uid="uid://dagn5bf7ou3sd" path="res://ui/UI.tscn" id="17_43qhq"]
[ext_resource type="Material" uid="uid://bdsblfaxbipaa" path="res://world/grass/GrassMaterial.tres" id="18_tja64"]
[ext_resource type="Script" path="res://camera/Camera.gd" id="18_wogcj"]
[ext_resource type="MultiMesh" uid="uid://dog5aq5n2q025" path="res://assets/grass/grass.multimesh" id="19_ae26a"]
[ext_resource type="PackedScene" uid="uid://cm0rho6adv2p7" path="res://world/water/Water.tscn" id="20_bmo3k"]
@ -94,20 +94,7 @@ autostart = true
[node name="World" type="Node3D" parent="."]
[node name="Follow" type="Node3D" parent="World"]
[node name="Pivot" type="Marker3D" parent="World/Follow"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0)
[node name="Camera" type="Camera3D" parent="World/Follow/Pivot" node_paths=PackedStringArray("follow_node", "pivot_node")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 3.5, 7.5)
current = true
fov = 30.0
size = 10.0
far = 1000.0
script = ExtResource("18_wogcj")
follow_node = NodePath("../..")
pivot_node = NodePath("..")
[node name="Follow" parent="World" instance=ExtResource("12_aljdh")]
[node name="Environment" type="WorldEnvironment" parent="World"]
environment = ExtResource("12_cscto")
@ -115,7 +102,7 @@ camera_attributes = ExtResource("15_6h2nx")
[node name="Sun" type="DirectionalLight3D" parent="World/Environment"]
transform = Transform3D(-0.350207, 0.827032, -0.439741, 0, 0.469472, 0.882948, 0.936672, 0.309215, -0.164412, 0, 3, 0)
light_energy = 2.0
light_energy = 1.8
shadow_enabled = true
script = ExtResource("11_4jb08")