name
setMultiplier ( )
import processing.opengl.*;

import procontroll.*;
import net.java.games.input.*;

ControllIO controllIO;
ControllDevice joypad;
ControllCoolieHat cooliehat;

float transX;
float transY;

void setup(){
  size(600,600,OPENGL);

  transX = width/2;
  transY = height/2;

  controllIO = ControllIO.getInstance(this);

  joypad = controllIO.getDevice("Logitech RumblePad 2 USB");
  joypad.printButtons();

  cooliehat = joypad.getCoolieHat(0);
  cooliehat.setMultiplier(4);
}

void handleButton1Press(){
  fill(255,0,0);
  joypad.rumble(1);
}

void draw(){
  transX += cooliehat.getX();
  transY += cooliehat.getY();
  
  background(0);
  lights();
  translate(transX,transY,0);
  box(200);
}
description
Pressing a cooliehat causes a change by 1 in the according direction. With the multiplier you can increase and decrese this range. Use this method to set the actual multiplier. By default this value is 1.0.
syntax
setMultiplier(i_multiplier);
parameters
i_multiplier
float, the new multiplier for a CrossButton
returns
None
usage
application
related