From 7095ad10e02f2a350cd14052af73a9b49a948de6 Mon Sep 17 00:00:00 2001 From: JESTERRRRRR Date: Fri, 5 Oct 2018 07:44:10 +0100 Subject: [PATCH] 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. --- jme3-core/src/main/java/com/jme3/input/FlyByCamera.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jme3-core/src/main/java/com/jme3/input/FlyByCamera.java b/jme3-core/src/main/java/com/jme3/input/FlyByCamera.java index 30d7a3b78..f7ffa78f1 100644 --- a/jme3-core/src/main/java/com/jme3/input/FlyByCamera.java +++ b/jme3-core/src/main/java/com/jme3/input/FlyByCamera.java @@ -412,7 +412,7 @@ public class FlyByCamera implements AnalogListener, ActionListener { * @param value translation amount */ protected void riseCamera(float value){ - Vector3f vel = new Vector3f(0, value * moveSpeed, 0); + Vector3f vel = initialUpVec.mult(value * moveSpeed); Vector3f pos = cam.getLocation().clone(); if (motionAllowed != null)