From d19fb45d94ef836ea31fdb11b4cac3d7048ae010 Mon Sep 17 00:00:00 2001 From: march3 Date: Thu, 20 Apr 2023 12:42:05 +0800 Subject: [PATCH] =?UTF-8?q?Python=E8=B6=85=E4=BA=BA-=E5=AE=87=E5=AE=99?= =?UTF-8?q?=E6=A8=A1=E6=8B=9F=E5=99=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- simulators/ursina/entities/planet.py | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/simulators/ursina/entities/planet.py b/simulators/ursina/entities/planet.py index e3d93d4..a9d7f07 100644 --- a/simulators/ursina/entities/planet.py +++ b/simulators/ursina/entities/planet.py @@ -173,14 +173,19 @@ class Planet(Entity): # UrsinaConfig.SCALE_FACTOR * 10000000 = 5 # UrsinaConfig.auto_scale_factor = 1 # UrsinaConfig.body_size_factor = 1 - if self.main_entity is self: - # 没有偏转角度 - line_scale = math.pow(self.main_entity.scale_x, 1 / 10) / 1.5 - else: - # 有偏转角度 - # line_scale = math.pow(self.main_entity.scale_x, 1 / 10) - line_scale = self.scale_x + # if self.main_entity is self: + # # 没有偏转角度 + # line_scale = math.pow(self.main_entity.scale_x, 1 / 10) / 1.5 + # else: + # # 有偏转角度 + # # line_scale = math.pow(self.main_entity.scale_x, 1 / 10) + # line_scale = self.scale_x # camera.scale_x + line_scale = 0.9 * self.scale_x / self.main_entity.scale_x + # print(self.body.name, self.main_entity.scale_x, self.scale_x, line_scale) + # 0.006373216398060322 0.006373216398060322 0.40210975353339423 + # 1.0 0.006373216398060322 0.006373216398060322 + create_line(from_pos, to_pos, parent=self.main_entity, len_scale=line_scale, color=line_color, thickness=2) -- GitLab