Skip to content

Commit 1d9722b

Browse files
committed
made ray local / removed unused global
1 parent 758ac3d commit 1d9722b

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

demos/src/main/java/demos/jam26port/combat/ShootComponent.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,10 @@ public class ShootComponent extends AbstractComponent {
2222

2323
private final Input input;
2424

25-
private final float range = 1000f;
26-
2725
private boolean lastPressed;
2826

2927
private Bounds bounds;
3028

31-
private Ray3f ray;
32-
3329
public ShootComponent(Input input) {
3430
this.input = input;
3531
}
@@ -43,7 +39,7 @@ public void onUpdate(float tpf) {
4339
}
4440
lastPressed = pressed;
4541
Camera camera = getOwner().getScene().getActiveCamera();
46-
ray = Raycaster.crossHairRay(camera);
42+
Ray3f ray = Raycaster.crossHairRay(camera);
4743
RaycastQuery query = new RaycastQuery(ray);
4844
getOwner().getScene().visitRootNodes(query);
4945
RaycastHit hit = query.getResult();

0 commit comments

Comments
 (0)