From a3b77a734e5e7d53b59d9c62f0a39efad14ce2d0 Mon Sep 17 00:00:00 2001 From: Techwizz Date: Tue, 28 Feb 2023 13:33:00 -0700 Subject: [PATCH] Lighting on Toyland --- .DS_Store | Bin 8196 -> 8196 bytes characters/teddy/Teddy.gd | 2 ++ scenes/toyland.tscn | 14 ++++++++++---- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/.DS_Store b/.DS_Store index b365780f1077ef9f4e5c0b549a9798703a3aa67e..ab185d1bfc38cc0a4ad03adeedd4d2f69cc7bc93 100644 GIT binary patch delta 53 zcmZp1XmQxEQGjvh?dkM-j_H51)oWr)6UE&+d J=076r%mCBU5XJxi delta 39 vcmZp1XmQxEQDE{Wp;8WG3kw|ub3^mV`oi{`^8{zIZDy1B&a(NR2s<+X3l0q2 diff --git a/characters/teddy/Teddy.gd b/characters/teddy/Teddy.gd index a27c2a9..dc12b12 100644 --- a/characters/teddy/Teddy.gd +++ b/characters/teddy/Teddy.gd @@ -12,6 +12,7 @@ var gravity = ProjectSettings.get_setting("physics/3d/default_gravity") @onready var camera := $CollisionShape3D/Neck/Camera3D @onready var teddyAuthority = get_multiplayer_authority() var selfTeddy +var selfTeddyNode var teddyCollider var teddyParent var menuOpen = false @@ -23,6 +24,7 @@ func _ready(): Global.playingGame = true Global.selfTeddy = selfTeddy selfTeddy = self.get_path() + selfTeddyNode = get_node(selfTeddy) teddyCollider = str(self.get_path()) + '/CollisionShape3D' teddyParent = get_node(selfTeddy).get_parent() Global.teddyAuthorityID = teddyAuthority diff --git a/scenes/toyland.tscn b/scenes/toyland.tscn index 0dc9683..6e5aeb8 100644 --- a/scenes/toyland.tscn +++ b/scenes/toyland.tscn @@ -7,11 +7,17 @@ [node name="toyland" type="Node3D"] script = ExtResource("1_vq5un") +[node name="sun" type="DirectionalLight3D" parent="."] +transform = Transform3D(0.994522, -0.078408, -0.0691259, 0, 0.661312, -0.750111, 0.104528, 0.746002, 0.657689, 0, 0, 0) +light_energy = 10.0 +shadow_enabled = true +directional_shadow_max_distance = 1.0 + [node name="HUD" parent="." instance=ExtResource("1_w2y7j")] show_behind_parent = true -[node name="DirectionalLight3D" type="DirectionalLight3D" parent="."] -transform = Transform3D(-0.0034906, -0.94887, 0.315647, 0, 0.315649, 0.948876, -0.999994, 0.00331215, -0.00110181, 0, 0, 0) -shadow_enabled = true - [node name="toylandnocolliders" parent="." instance=ExtResource("3_uudje")] + +[node name="sky" type="DirectionalLight3D" parent="."] +transform = Transform3D(-0.991058, 0, 0.133433, 0, 1, 0, -0.133433, 0, -0.991058, 0, 119.039, -258.031) +light_energy = 3.75