The ray class is mostly refactored, but the collision code needs to be debugged.

This commit is contained in:
Quinn
2023-04-08 10:18:56 -05:00
parent cd4ec2c819
commit 527615220f
6 changed files with 53 additions and 35 deletions

View File

@@ -25,7 +25,7 @@ public class View {
rays.clear();
float angle = (float) (0.01 - angleOffset); //the 0.01 fixes some bugs
for (int i = 0; i < numberOfRays; i++) {
Ray ray = new Ray(proc, pose, 100000, angle);
Ray ray = new Ray(pose, angle);
angle = angle + rayStep;
rays.add(ray);
}
@@ -35,7 +35,7 @@ public class View {
public void look(ArrayList<Wall> walls) {
for (Ray ray : rays) {
ray.castRay(walls);
ray.drawRay();
ray.drawRay(proc);
}
}