VIRTUAL TOUCHSCREEN JOYSTICK(HTML5)

Hello,

Here is a project that provides a virtual touchscreen joystick on its HTML5 application, which is used through the events of your scene. The project is discussed.
freetalent.fr/gd/samples/virtualpad.zip

Just add the source of your project vpad.js the script and javascript event in your scene. Global variables will be automatically added to your application and can be tested since the events of your scene.

The variables :

  • vpad_opacity: between 0.0 (invisible) and 1.0 (default completely visible). 0.5 = 50% of the opacity
  • vpad_A_Button: 0 (hidden) or 1 (Visible)
  • vpad_B_Button: 0 (hidden) or 1 (Visible)
  • vpad_C_Button: 0 (hidden) or 1 (Visible)
  • vpad_A_Button_state: 0 (not pressed) or 1 (pressed)
  • vpad_B_Button_state: 0 (not pressed) or 1 (pressed)
  • vpad_C_Button_state: 0 (not pressed) or 1 (pressed)
  • vpad_UP: 0 (not pressed) or 1 (pressed)
  • vpad_LEFT: 0 (not pressed) or 1 (pressed)
  • vpad_DOWN: 0 (not pressed) or 1 (pressed)
  • vpad_RIGHT: 0 (not pressed) or 1 (pressed)

The controller offers up to 3 buttons (A, B and C) that can be displayed or not (as needed). You can also set the opacity of the joystick.

Freetalent.

1 Like