From e0e1a619f0d0fd69578f1d6b73907d52878d01ba Mon Sep 17 00:00:00 2001 From: Quantum Date: Fri, 1 Nov 2013 12:19:18 -0400 Subject: [PATCH] Stops the sky from rotating. Also: asteroids go front when you move back. Uranus rotates about the right axis. --- punyverse/game.py | 2 +- punyverse/world.json | 4 ++-- punyverse/world.py | 3 ++- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/punyverse/game.py b/punyverse/game.py index b2aa056..0ce16ee 100644 --- a/punyverse/game.py +++ b/punyverse/game.py @@ -197,7 +197,7 @@ class Applet(pyglet.window.Window): elif symbol == key.SPACE: c = self.cam dx, dy, dz = c.direction() - speed = self.speed * 1.1 + 5 + speed = abs(self.speed) * 1.1 + 5 dx *= speed dy *= speed dz *= speed diff --git a/punyverse/world.json b/punyverse/world.json index 78d474c..82a1806 100644 --- a/punyverse/world.json +++ b/punyverse/world.json @@ -242,8 +242,7 @@ "radius": 25559, "mass": 8.6810e+25, "z": "19.23 * AU", - "pitch": -90, - "yaw": 97.77, + "pitch": 7.77, "rotation": -62064, "orbit_distance": "6 * AU", "ring": { @@ -267,6 +266,7 @@ }, "sky": { "texture": "sky.jpg", + "rotation": 0, "optional": true, "lighting": false, "radius": 305000000, diff --git a/punyverse/world.py b/punyverse/world.py index 7ec8a88..8152277 100644 --- a/punyverse/world.py +++ b/punyverse/world.py @@ -143,7 +143,8 @@ def load_world(file): if not cheap: atmosphere_id = compile(disk, radius, radius + size, 30, atm_texture) - object = type(object_id, (x, y, z), (pitch, yaw, roll), rotation_angle=360 / (rotation + .0), + theta = 360 / (rotation + .0) if rotation else 0 + object = type(object_id, (x, y, z), (pitch, yaw, roll), rotation_angle=theta, atmosphere=atmosphere_id, cloudmap=cloudmap_id, background=background, **params) world.tracker.append(object)