From 2000cd99d1602c4bdececa38e04cbaa7632d1dc8 Mon Sep 17 00:00:00 2001 From: Tusnad30 <89738410+Tusnad30@users.noreply.github.com> Date: Sun, 10 Dec 2023 17:20:20 +0100 Subject: [PATCH] Fixed update() function not running --- scene_lighting.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scene_lighting.py b/scene_lighting.py index 49d44bc..29cb58d 100644 --- a/scene_lighting.py +++ b/scene_lighting.py @@ -10,6 +10,8 @@ def __init__(self, ursina, player, sun_direction = (0.75, -1, 0.5), sun_color = shadow_filter_radius = 3.0, shadow_filter_samples = 10.0, soft_shadows = True, sky_texture = None, sky_color = (1.0, 1.0, 1.0, 1.5), gamma = 2.0): + super().__init__() + self.player = player self.shadow_camera_direction_offset = (shadow_size / 2.0) * shadow_camera_direction_offset @@ -110,4 +112,4 @@ def createNoiseTexture(tex_size): def update(self): - self.shadow_cam_np.setPos(self.player.world_position + camera.forward.normalized() * self.shadow_camera_direction_offset) \ No newline at end of file + self.shadow_cam_np.setPos(self.player.world_position + camera.forward.normalized() * self.shadow_camera_direction_offset)