mirror of
https://github.com/RandomityGuy/MBHaxe.git
synced 2025-10-30 08:11:25 +00:00
add deadzone for camera input
This commit is contained in:
parent
84257d1903
commit
416ef13f0d
1 changed files with 4 additions and 0 deletions
|
|
@ -79,6 +79,10 @@ class CameraInput {
|
|||
if (jumpcam) {
|
||||
scaleFactor /= Settings.touchSettings.buttonJoystickMultiplier;
|
||||
}
|
||||
if (Math.abs(delta.x) < 0.05)
|
||||
delta.x = 0;
|
||||
if (Math.abs(delta.y) < 0.05)
|
||||
delta.y = 0;
|
||||
MarbleGame.instance.world.marble.camera.orbit(applyNonlinearScale(delta.x / scaleFactor), applyNonlinearScale(delta.y / scaleFactor), true);
|
||||
prevMouse.x = e.relX;
|
||||
prevMouse.y = e.relY;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue