Commit:
382fdf1Parent:
79dedadFix bunny-dog intersection bug
The bunnies would be too close to the dog and escape into the air/ground.
src/bunny.rs
+1
-1
diff --git a/src/bunny.rs b/src/bunny.rs
index 08b89ce..7f681fe 100644
@@ -108,7 +108,7 @@ fn control_sitting(
return;
}
let dog_direction = direction.normalize();
let dog_direction = direction.with_y(0.0).normalize();
let Some(to) = obstacles.avoid(
bunny_transform.translation,
bunny_transform.translation + dog_direction * SCARED_JUMP_DISTANCE,