Browse Source

joystick fine-tuning

main
Hendrik Langer 4 years ago
parent
commit
d08c9af0bf
  1. 7
      raspberry/roberto/views/frontend/templates/gamepad.js

7
raspberry/roberto/views/frontend/templates/gamepad.js

@ -113,7 +113,7 @@ var joystick_axes = {
joystick.on('move', function(evt, data) {
joystick_axes.x1 = data.vector.x;
joystick_axes.y1 = data.vector.y;
joystick_axes.y1 = -data.vector.y;
joystick_axes.moved = true;
});
@ -122,12 +122,13 @@ var joystick_axes = {
mode: 'static',
//catchDistance: 150,
position: {left: '50%', top: '50%'},
color: 'red'
color: 'red',
locky: true
});
joystick2.on('move', function(evt, data) {
joystick_axes.x2 = data.vector.x;
joystick_axes.y2 = data.vector.y;
joystick_axes.y2 = -data.vector.y;
joystick_axes.moved = true;
});

Loading…
Cancel
Save