Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

making progress with ode. created minigame which records highest velo…

…city collisions
  • Loading branch information...
commit ed7fd3fc9feac8f8412fafe43008f441cb762629 1 parent d52c84d
@AlexWillisson authored
Showing with 7 additions and 4 deletions.
  1. +7 −4 minigame.py
View
11 minigame.py
@@ -35,10 +35,13 @@ def near_callback(args, geom1, geom2):
if (geom1 == geoms[0] and geom2 == geoms[1]) \
or (geom1 == geoms[1] and geom2 == geoms[0]):
- vel = bodies[0].getLinearVel ()
- speed = math.hypot (vel[0], vel[1])
- if speed > best_speed:
- best_speed = speed
+ vel0 = bodies[0].getLinearVel ()
+ speed0 = math.hypot (vel0[0], vel0[1])
+ vel1 = bodies[1].getLinearVel ()
+ speed1 = math.hypot (vel1[0], vel1[1])
+
+ if speed0 + speed1 > best_speed:
+ best_speed = speed0 + speed1
flash = True
Please sign in to comment.
Something went wrong with that request. Please try again.