from ursina import * from ursina.prefabs.first_person_controller import FirstPersonController from sim_scenes.func import create_sphere_sky app = Ursina() texture = load_texture("../../../objs/textures/core_valaga_clas.jpg") camera_ship = Entity(model="../../../objs/models/core_valaga_clas.obj", texture=texture, double_sided=True) shperes = [] def create_sphere(): shpere = Entity( # model="sphere", model="../../../objs/models/drops.obj", texture=load_texture("../../../objs/textures/rock_snow.jpg"), position=camera_ship.position, scale=500) shperes.append(shpere) # camera.parent = camera_ship.planet # camera.reparent_to(camera_ship.planet) # camera.scale = 100 camera.fov = 60 # camera.clip_plane_near = 0.1 camera.clip_plane_far = 51000000 create_sphere_sky(scale=5000000) camera.parent = camera_ship camera.reparent_to(camera_ship) camera.position = [0, 1000, -3000] camera.rotation_x = 10 # application.time_scale = 1 def update(): camera_ship.position += Vec3(0, 0, 10) camera_ship.rotation_y += 0.01 # camera.position = Vec3(0, 1000, -1000) for shpere in shperes: shpere.rotation_y = camera_ship.rotation_y shpere.position += shpere.forward * 10 def input(key): print(key) if key == "space": create_sphere() # player = FirstPersonController() # EditorCamera() app.run()