diff --git a/src/translate.rs b/src/translate.rs index 161185f..96c174c 100644 --- a/src/translate.rs +++ b/src/translate.rs @@ -21,7 +21,7 @@ impl Hittable for Translate { match &self.hittable.hit(&moved_ray, t_min, t_max) { Some(hit_record) => { let mut hr = HitRecord { - point: hit_record.point, + point: hit_record.point + self.offset, material: hit_record.material, front_face: hit_record.front_face, // Maybe need to calc normal and front_face again? normal: hit_record.normal,