mirror of
https://github.com/RandomityGuy/MBHaxe.git
synced 2025-10-30 08:11:25 +00:00
better default camera sens after we nerfed it
This commit is contained in:
parent
85ce3b2102
commit
e71390a159
5 changed files with 20 additions and 10 deletions
|
|
@ -4,8 +4,8 @@
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
package="com.randomityguy.mbhaxe.mbu"
|
package="com.randomityguy.mbhaxe.mbu"
|
||||||
android:installLocation="auto"
|
android:installLocation="auto"
|
||||||
android:versionCode="2"
|
android:versionCode="3"
|
||||||
android:versionName="2.1.0">
|
android:versionName="2.1.1">
|
||||||
|
|
||||||
<!-- Tell the system this app requires OpenGL ES 3.0. -->
|
<!-- Tell the system this app requires OpenGL ES 3.0. -->
|
||||||
<uses-feature android:glEsVersion="0x00030000" android:required="true" />
|
<uses-feature android:glEsVersion="0x00030000" android:required="true" />
|
||||||
|
|
|
||||||
|
|
@ -156,7 +156,7 @@ class Settings {
|
||||||
powerup: Key.MOUSE_LEFT,
|
powerup: Key.MOUSE_LEFT,
|
||||||
freelook: Key.MOUSE_MIDDLE,
|
freelook: Key.MOUSE_MIDDLE,
|
||||||
alwaysFreeLook: true,
|
alwaysFreeLook: true,
|
||||||
cameraSensitivity: 0.6,
|
cameraSensitivity: 1.135,
|
||||||
invertYAxis: false,
|
invertYAxis: false,
|
||||||
respawn: Key.BACKSPACE,
|
respawn: Key.BACKSPACE,
|
||||||
blast: Key.MOUSE_RIGHT,
|
blast: Key.MOUSE_RIGHT,
|
||||||
|
|
|
||||||
|
|
@ -95,12 +95,6 @@ class InputOptionsGui extends GuiImage {
|
||||||
|
|
||||||
flOpt.setCurrentOption(Settings.controlsSettings.alwaysFreeLook ? 1 : 0);
|
flOpt.setCurrentOption(Settings.controlsSettings.alwaysFreeLook ? 1 : 0);
|
||||||
|
|
||||||
var msOpt = optionCollection.addOption(1, "Mouse Sensitivity", numberRange(10, 100, 5), (idx) -> {
|
|
||||||
Settings.controlsSettings.cameraSensitivity = cast(0.2 + (idx / 18.0) * (3 - 0.2));
|
|
||||||
return true;
|
|
||||||
}, 0.5, 118);
|
|
||||||
msOpt.setCurrentOption(Std.int(Util.clamp(Math.floor(((Settings.controlsSettings.cameraSensitivity - 0.2) / (3 - 0.2)) * 18), 0, 18)));
|
|
||||||
|
|
||||||
var bottomBar = new GuiControl();
|
var bottomBar = new GuiControl();
|
||||||
bottomBar.position = new Vector(0, 590);
|
bottomBar.position = new Vector(0, 590);
|
||||||
bottomBar.extent = new Vector(640, 200);
|
bottomBar.extent = new Vector(640, 200);
|
||||||
|
|
|
||||||
|
|
@ -57,6 +57,21 @@ class TouchOptionsGui extends GuiImage {
|
||||||
optionCollection.extent = new Vector(815, 500);
|
optionCollection.extent = new Vector(815, 500);
|
||||||
innerCtrl.addChild(optionCollection);
|
innerCtrl.addChild(optionCollection);
|
||||||
|
|
||||||
|
function numberRange(start:Int, stop:Int, step:Int) {
|
||||||
|
var range = [];
|
||||||
|
while (start <= stop) {
|
||||||
|
range.push('${start}');
|
||||||
|
start += step;
|
||||||
|
}
|
||||||
|
return range;
|
||||||
|
}
|
||||||
|
|
||||||
|
var msOpt = optionCollection.addOption(1, "Camera Sensitivity", numberRange(10, 100, 5), (idx) -> {
|
||||||
|
Settings.controlsSettings.cameraSensitivity = cast(0.2 + (idx / 18.0) * (3 - 0.2));
|
||||||
|
return true;
|
||||||
|
}, 0.5, 118);
|
||||||
|
msOpt.setCurrentOption(Std.int(Util.clamp(Math.floor(((Settings.controlsSettings.cameraSensitivity - 0.2) / (3 - 0.2)) * 18), 0, 18)));
|
||||||
|
|
||||||
var cameraMultiplier = optionCollection.addOption(1, "Button-Camera Factor", ["0.5", "1", "1.5", "2", "2.5", "3", "3.5"], (idx) -> {
|
var cameraMultiplier = optionCollection.addOption(1, "Button-Camera Factor", ["0.5", "1", "1.5", "2", "2.5", "3", "3.5"], (idx) -> {
|
||||||
Settings.touchSettings.buttonJoystickMultiplier = 0.5 + (idx * 0.5);
|
Settings.touchSettings.buttonJoystickMultiplier = 0.5 + (idx * 0.5);
|
||||||
return true;
|
return true;
|
||||||
|
|
|
||||||
|
|
@ -89,8 +89,9 @@ class CameraInput {
|
||||||
if (Math.abs(inpY) < 1.3)
|
if (Math.abs(inpY) < 1.3)
|
||||||
inpY = 0;
|
inpY = 0;
|
||||||
}
|
}
|
||||||
|
var dt = MarbleGame.instance.world.timeState.dt;
|
||||||
|
|
||||||
MarbleGame.instance.world.marble.camera.orbit(applyNonlinearScale(inpX), applyNonlinearScale(inpY), true);
|
MarbleGame.instance.world.marble.camera.orbit(applyNonlinearScale(inpX) * dt * 25, applyNonlinearScale(inpY) * dt * 25, true);
|
||||||
if (inpX != 0)
|
if (inpX != 0)
|
||||||
prevMouse.x = e.relX;
|
prevMouse.x = e.relX;
|
||||||
if (inpY != 0)
|
if (inpY != 0)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue