diff --git a/sim_scenes/featured/wormhole_sim_v2.py b/sim_scenes/featured/wormhole_sim_v2.py index 605266a125ad0db63f5be8769d020cd762abb4a0..49be2cbbda26bac78c3c184d61ea776123bb97c3 100644 --- a/sim_scenes/featured/wormhole_sim_v2.py +++ b/sim_scenes/featured/wormhole_sim_v2.py @@ -75,9 +75,12 @@ class WormholeSim(UniverseSimScenes): # around_acc_speed: int = -1.5 wormhole_infos = [ - {"name": "我们宇宙", "position": [D, 0, -D], "rotation_y": 100, "around_direction": "left", - "camera_forward_speed": 0, "around_max_count": 200, "camera_target_max_speed": 1000, - "around_max_speed": -300, "around_min_speed": 150, + {"name": "我们宇宙", "position": [D, 0, -D], "rotation_y": 100, + # "around_direction": "left", + "around_direction": "", + "camera_forward_speed": 0, "around_max_count": 800, "camera_target_max_speed": 1000, + # "around_max_speed": -300, "around_min_speed": 150, + "around_max_speed": -2, "around_min_speed": 1, "camera_max_speed": 2200, "camera_target_init_speed": 5}, {"name": "宇宙1", "position": [D, 0, D], "rotation_z": 0, "around_acc_speed": -2, "around_direction": "left", @@ -230,7 +233,7 @@ class WormholeSim(UniverseSimScenes): # camera.scale = 1000 # camera.parent = camera_target.planet # camera.rotation_x = 90 - camera.fov = 110 + camera.fov = 100 # 110 for universe in self.universes: universe.planet.collider = "sphere" @@ -320,7 +323,7 @@ class WormholeSim(UniverseSimScenes): self.camera_target.speed = self.get_wormhole_data("camera_target_init_speed") camera.speed = self.get_wormhole_data("camera_init_speed") - if self.exit_app and self.current_idx == 2: + if self.exit_app and self.current_idx == 1: print("结束") exit(0) @@ -405,7 +408,7 @@ class WormholeSim(UniverseSimScenes): def scale_up(self, obj): if obj is None: return - obj.planet.init_scale = self.SIZE_SCALE * 100 + obj.planet.init_scale = self.SIZE_SCALE * 500 def scale_down(self, obj, scale_size=None): if obj is None: @@ -425,7 +428,10 @@ class WormholeSim(UniverseSimScenes): self.camera_target.planet.look_at(around_target) # print(self.camera_target.planet.rotation_x,self.camera_target.planet.rotation_y,self.camera_target.planet.rotation_z) - planet_direction = getattr(self.camera_target.planet, around_direction) + if around_direction == "" or around_direction is None: + planet_direction = None + else: + planet_direction = getattr(self.camera_target.planet, around_direction) if not hasattr(self.camera_target, "around_speed"): self.camera_target.around_speed = 0 @@ -448,7 +454,8 @@ class WormholeSim(UniverseSimScenes): if abs(self.camera_target.around_speed) > abs(around_max_speed): self.camera_target.around_speed = around_max_speed - self.camera_target.planet.position += planet_direction * self.camera_target.around_speed + if planet_direction is not None: + self.camera_target.planet.position += planet_direction * self.camera_target.around_speed print("around_speed", self.camera_target.around_speed)