Commits

Daniel Pope committed 1bf7358 Draft

Fix: attachment of barrage balloons

  • Participants
  • Parent commits 47cae5d

Comments (0)

Files changed (2)

File korovic/components/obstacles.py

     LIFT = v(0, 100000)
     MASS = 50
     collision_group = 2
-    yfix = -1    # This is a bodge to fix insertion points - see base class
 
     def __init__(self):
         self.sprite = pyglet.sprite.Sprite(self.image, 0, 0)
         return bs
 
     def tether_to(self, body, alt):
-        self.body.position = body.position + v(0, alt) - self.insertion_point
+        self.body.position = body.position + v(0, alt)
         self.tether = Tether(
-            a=self.body.local_to_world(self.insertion_point),
+            a=self.body.local_to_world(-self.insertion_point),
             b=v(body.position),
             c1=self.body,
             c2=body,

File korovic/world.py

                 if x + iw < w:
                     self.width = None
             elif type == 'barrageballoon':
+                x += iw * 0.5
+                y += ih * 0.7
                 balloon = components.BarrageBalloon()
                 self.actors.append(balloon)
                 b = pymunk.Body(pymunk.inf, pymunk.inf)