From f6bed1bd417c72145e65cd2acb45c865dfe1add1 Mon Sep 17 00:00:00 2001 From: Alex Date: Mon, 07 Jul 2008 20:53:43 +0000 Subject: Modified joint tool to use left click to add a centered fixed joint --- (limited to 'activity.py') diff --git a/activity.py b/activity.py index 601e409..3714de8 100644 --- a/activity.py +++ b/activity.py @@ -258,6 +258,11 @@ class JointTool(Tool): world.add.joint(self.jb2[0],self.jb2pos) # regardless, clean everything up self.jb1 = self.jb2 = self.jb1pos = self.jb2pos = None + if event.button == 3: + # add a centered fixed joint + self.jb2 = world.get_bodies_at_pos(event.pos) + if self.jb2: + world.add.joint(self.jb2[0]) def draw(self): if self.jb1: pygame.draw.line(screen,(100,180,255),self.jb1pos,pygame.mouse.get_pos(),3) -- cgit v0.9.1