fixed turnip/light positioning bug
[tabakrolletjie.git] / tabakrolletjie / scenes / day.py
index cbe0460c4717a86fb15181a1a9f040e0d49457a2..bf97f95bfc95133c6bb8bc7e49bc9beefc09203c 100644 (file)
@@ -191,7 +191,7 @@ class DayScene(BaseScene):
             # since that looks weird, but we don't want to center
             # the turnip under the mouse either, since that
             # causes issues as well, so we compromise
-            pos = (ev.pos[0] - 18, ev.pos[1] - 18)
+            pos = (ev.pos[0] - 6, ev.pos[1] - 6)
             try:
                 turnip = Turnip(age=0, pos=pos, space=self._space)
                 self._turnips.append(turnip)
@@ -206,6 +206,7 @@ class DayScene(BaseScene):
         angle = math.atan2(distance[1], distance[0])
         # Set light angle to this position
         self._dragging.ray_manager.direction = math.degrees(angle)
+        self._dragging.ray_manager.update_shapes()
         # Hackily update gamestate with new angle
         for light_cfg in gamestate.station["lights"]:
             light_pos = pymunk.Vec2d(light_cfg["position"])