SDK :
- applied changes of the core to scene composer git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7930 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
This commit is contained in:
parent
2fe3bc6dc6
commit
b8025984a0
@ -113,55 +113,7 @@ public class ComposerCameraController extends AbstractCameraController {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAnalog(String string, float f1, float f) {
|
||||
if ("MouseAxisX".equals(string)) {
|
||||
moved = true;
|
||||
movedR = true;
|
||||
if (isToolUsesCameraControls() || forceCameraControls) {
|
||||
if (buttonDownL) {
|
||||
rotateCamera(Vector3f.UNIT_Y, -f1 * 2.5f);
|
||||
}
|
||||
if (buttonDownR) {
|
||||
panCamera(f1 * 2.5f, 0);
|
||||
}
|
||||
}
|
||||
} else if ("MouseAxisY".equals(string)) {
|
||||
moved = true;
|
||||
movedR = true;
|
||||
if (isToolUsesCameraControls() || forceCameraControls) {
|
||||
if (buttonDownL) {
|
||||
rotateCamera(cam.getLeft(), -f1 * 2.5f);
|
||||
}
|
||||
if (buttonDownR) {
|
||||
panCamera(0, -f1 * 2.5f);
|
||||
}
|
||||
}
|
||||
} else if ("MouseAxisX-".equals(string)) {
|
||||
moved = true;
|
||||
movedR = true;
|
||||
if (isToolUsesCameraControls() || forceCameraControls) {
|
||||
if (buttonDownL) {
|
||||
rotateCamera(Vector3f.UNIT_Y, f1 * 2.5f);
|
||||
}
|
||||
if (buttonDownR) {
|
||||
panCamera(-f1 * 2.5f, 0);
|
||||
}
|
||||
}
|
||||
} else if ("MouseAxisY-".equals(string)) {
|
||||
moved = true;
|
||||
movedR = true;
|
||||
if (isToolUsesCameraControls() || forceCameraControls) {
|
||||
if (buttonDownL) {
|
||||
rotateCamera(cam.getLeft(), f1 * 2.5f);
|
||||
}
|
||||
if (buttonDownR) {
|
||||
panCamera(0, f1 * 2.5f);
|
||||
}
|
||||
}
|
||||
} else if ("MouseWheel".equals(string)) {
|
||||
zoomCamera(.1f);
|
||||
} else if ("MouseWheel-".equals(string)) {
|
||||
zoomCamera(-.1f);
|
||||
}
|
||||
public boolean useCameraControls() {
|
||||
return isToolUsesCameraControls() || forceCameraControls;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user