From: Joe Wreschnig Date: Tue, 16 Mar 2010 09:30:09 +0000 (-0700) Subject: Bullet: Track previous X/Y. X-Git-Url: https://git.yukkurigames.com/?p=python-bulletml.git;a=commitdiff_plain;h=006fb3dcabc9600997f5c3c8fcc5e80baa7fc1e0 Bullet: Track previous X/Y. --- diff --git a/bulletml/impl.py b/bulletml/impl.py index 6fe1641..4dde9fb 100644 --- a/bulletml/impl.py +++ b/bulletml/impl.py @@ -287,6 +287,8 @@ class Bullet(object): created.extend(action.step()) direction = math.radians(self.direction) + self.px = self.x + self.py = self.y self.x += self.mx + math.sin(direction) * self.speed self.y += self.my - math.cos(direction) * self.speed