FlyByCamera rise/fall behaviour (issue #617)

Changed riseCamera to use the up vector set with 'setUpVector(Vector3f upVec)' when pressing Q and Z which should make it go up/down.
This commit is contained in:
JESTERRRRRR 2018-10-05 07:44:10 +01:00 committed by Stephen Gold
parent 21454f2ab2
commit 7095ad10e0

View File

@ -412,7 +412,7 @@ public class FlyByCamera implements AnalogListener, ActionListener {
* @param value translation amount * @param value translation amount
*/ */
protected void riseCamera(float value){ protected void riseCamera(float value){
Vector3f vel = new Vector3f(0, value * moveSpeed, 0); Vector3f vel = initialUpVec.mult(value * moveSpeed);
Vector3f pos = cam.getLocation().clone(); Vector3f pos = cam.getLocation().clone();
if (motionAllowed != null) if (motionAllowed != null)