obstacle altitude

This commit is contained in:
Laura Klünder 2019-12-22 20:57:32 +01:00
parent 4826930bbb
commit 7734863c39
5 changed files with 37 additions and 3 deletions

View file

@ -151,7 +151,9 @@ class LevelGeometries:
for obstacle in space.obstacles.all():
if not obstacle.height:
continue
obstacles.setdefault(int(obstacle.height*1000), {}).setdefault(obstacle.color, []).append(
obstacles.setdefault(
int((obstacle.height+obstacle.altitude)*1000), {}
).setdefault(obstacle.color, []).append(
obstacle.geometry.intersection(space.walkable_geom)
)