More configurability

This commit is contained in:
2022-12-09 17:05:06 +01:00
parent 5afa8b22b2
commit 3bb3ffa3a0
3 changed files with 209 additions and 19 deletions
+1 -1
View File
@@ -151,7 +151,7 @@ class RayObservable(Observable):
'Can only raycast circular and rectangular entities!')
sq_dist = ((self.env.agent.pos[0]-x)*self.env.width) ** 2 \
+ ((self.env.agent.pos[1]-y)*self.env.height) ** 2
if sq_dist <= (radius + self.env.agent.radius + self.ray_len)**2:
if sq_dist <= (radius + self.env.agent.getQuasiRadius() + self.ray_len)**2:
entities_l.append(entity) # cannot use yield here!
return entities_l