|
10 | 10 | ESCAPE_SPEED = 1.5 |
11 | 11 | # square around the mouse's spawn (x=20, y=5), 10m a side |
12 | 12 | WAYPOINTS = [ |
13 | | - (25.0, 5.0, TAKEOFF_HEIGHT), |
| 13 | + (25.0, 5.0, TAKEOFF_HEIGHT), |
14 | 14 | (25.0, 10.0, TAKEOFF_HEIGHT), |
15 | 15 | (20.0, 10.0, TAKEOFF_HEIGHT), |
16 | 16 | (15.0, 10.0, TAKEOFF_HEIGHT), |
17 | | - (15.0, 5.0, TAKEOFF_HEIGHT), |
18 | | - (15.0, 0.0, TAKEOFF_HEIGHT), |
19 | | - (20.0, 0.0, TAKEOFF_HEIGHT), |
20 | | - (25.0, 0.0, TAKEOFF_HEIGHT), |
| 17 | + (15.0, 5.0, TAKEOFF_HEIGHT), |
| 18 | + (15.0, 0.0, TAKEOFF_HEIGHT), |
| 19 | + (20.0, 0.0, TAKEOFF_HEIGHT), |
| 20 | + (25.0, 0.0, TAKEOFF_HEIGHT), |
21 | 21 | ] |
22 | | -REACH_THRESHOLD = 1.2 # how close counts as "reached this corner" |
| 22 | +REACH_THRESHOLD = 1.2 # how close counts as "reached this corner" |
23 | 23 |
|
24 | 24 |
|
25 | 25 | def distance(pos, target): |
26 | 26 | return math.sqrt( |
27 | | - (pos[0] - target[0]) ** 2 + |
28 | | - (pos[1] - target[1]) ** 2 + |
29 | | - (pos[2] - target[2]) ** 2 |
| 27 | + (pos[0] - target[0]) ** 2 |
| 28 | + + (pos[1] - target[1]) ** 2 |
| 29 | + + (pos[2] - target[2]) ** 2 |
30 | 30 | ) |
31 | 31 |
|
32 | 32 |
|
|
0 commit comments