Author Topic: Gamepad/Joystick use in Blockland  (Read 2517 times)

Well, it was something that took me some time to figure out.

I have a Playstation Controller with a adapter plugged into my PC,
I want to use it mainly for the control of vehicles in the game, cause it's just suited in a better way for it then the mouse.

I found the command "enableJoystick();" that enables the Controller.
And I mapped the Axes from the Controller to the standard controls that are used for the mouse.

It worked... well optimal... it's to insensetive, I push the brown townog stick fully to the right and the head of my player just ticks a little bit to the side I pushed.

My target is to use the Gamepad for the control of vehicles, it should also have something like autocentering so when I get the brown townog stick into the center position, the view also should go into the center position... thought, I don't know if someone knows how to make this possible.

Grettings
  Zerosan (Hope someone can help me with that.)

I think an Xbox 360 controller would work, as the ABXY buttons have the same code as the ABXY keys on a keyboard.

yes an xbox 360 controller works( only the wired kind), Ive tried it before but you need a program to bind its keys to the keyboard and mouse

It is possible without using 3rd party software but it requires manual addition of the binds via console/script.

Code: [Select]
function joystickon() {
enableJoystick();
moveMap.bind(joystick0, "xaxis", yaw);
moveMap.bind(joystick0, "yaxis", pitch);
moveMap.bind(joystick0, "button12", moveforward);
moveMap.bind(joystick0, "button14", movebackward);
moveMap.bind(joystick0, "button15", moveleft);
moveMap.bind(joystick0, "button13", moveright);
}
function joystickoff() {
disableJoystick();
moveMap.bind(mouse0, "xaxis", yaw);
moveMap.bind(mouse0, "yaxis", pitch);
moveMap.bind(keyboard, "w", moveforward);
moveMap.bind(keyboard, "s", movebackward);
moveMap.bind(keyboard, "a", moveleft);
moveMap.bind(keyboard, "d", moveright);
}

But the axis isn't working the way I want it. It's to slow.... (verrrrryyyyyyyy slooooow).

Up the pitch and yaw values until you find the right combination.