Moving camera forward with setLocation and flyCam.setEnabled(false);

How do I move the camera forward with cam.setLocation(Vector3f.ZERO); ? Obviously the .ZERO shouldn’t be there but where do I put values at to move it forward? I’ve tried + and * but neither are accepted

cam.setLocation() sets the location of the camera. You need to calculate what your new location should be and pass that to setLocation().

As for calculating a new location, this might help:

1 Like

Thank you for quick reply i will check that link out.

Excellent! Pointing me in the right direction so far, Great link thanks mate.

1 Like