v1.2.0: increased controller deadzone slightly
This commit is contained in:
parent
c65adf30ac
commit
e4962f9397
|
@ -164,14 +164,15 @@ public class PixelScene extends Scene {
|
||||||
@Override
|
@Override
|
||||||
public void update() {
|
public void update() {
|
||||||
super.update();
|
super.update();
|
||||||
//15% deadzone
|
//20% deadzone
|
||||||
if (Math.abs(ControllerHandler.rightStickPosition.x) >= 0.15f
|
System.out.println("x: " + ControllerHandler.rightStickPosition.x + " y: " + ControllerHandler.rightStickPosition.y);
|
||||||
|| Math.abs(ControllerHandler.rightStickPosition.y) >= 0.15f) {
|
if (Math.abs(ControllerHandler.rightStickPosition.x) >= 0.2f
|
||||||
|
|| Math.abs(ControllerHandler.rightStickPosition.y) >= 0.2f) {
|
||||||
if (!ControllerHandler.controllerPointerActive()) {
|
if (!ControllerHandler.controllerPointerActive()) {
|
||||||
ControllerHandler.setControllerPointer(true);
|
ControllerHandler.setControllerPointer(true);
|
||||||
virtualCursorPos = PointerEvent.currentHoverPos();
|
virtualCursorPos = PointerEvent.currentHoverPos();
|
||||||
}
|
}
|
||||||
//cursor moves 500 scaled pixels per second at full speed, 75 at minimum speed
|
//cursor moves 500 scaled pixels per second at full speed, 100 at minimum speed
|
||||||
virtualCursorPos.x += defaultZoom * 500 * Game.elapsed * ControllerHandler.rightStickPosition.x;
|
virtualCursorPos.x += defaultZoom * 500 * Game.elapsed * ControllerHandler.rightStickPosition.x;
|
||||||
virtualCursorPos.y += defaultZoom * 500 * Game.elapsed * ControllerHandler.rightStickPosition.y;
|
virtualCursorPos.y += defaultZoom * 500 * Game.elapsed * ControllerHandler.rightStickPosition.y;
|
||||||
virtualCursorPos.x = GameMath.gate(0, virtualCursorPos.x, Game.width);
|
virtualCursorPos.x = GameMath.gate(0, virtualCursorPos.x, Game.width);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user