diff options
Diffstat (limited to 'physics.py')
-rw-r--r-- | physics.py | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -66,6 +66,9 @@ class PhysicsGame: self.loop = True self.pygame_started = False + self.full_pos_list = [] + self.tracked_bodies = [] + def switch_off_fake_pygame_cursor_cb(self, panel, event): self.show_fake_cursor = False @@ -127,6 +130,12 @@ class PhysicsGame: self.show_fake_cursor = True if self.in_focus: + # Tracking object positions which have pens on them + if self.tracked_bodies is not []: + temp_zipped = zip(self.full_pos_list, self.tracked_bodies) + for single_body_list, body in temp_zipped: + self.single_body_list.append(body.position) + # Drive motors if self.world.run_physics: for body in self.world.world.GetBodyList(): |