The Right Trick for the Flight Stick

Hi gang, time for another stupid Wingnut contemplation.

Has anyone ever used a flight stick… as a BJS-scene input device? Anyone know?

Perhaps flight stick events “travel the same trail” as game-pad events. (Wingy low-edu on this topic, and SO much more.) :slight_smile:

How about steering wheel controllers, with pedals?

Remember WAY back when they made one-handed mini-steering wheel controllers… about the size of trackball controllers? No? Me neither, but the link above looks interesting, and takes less desk-space than a steering wheel. :slight_smile: (I drive SLOW vehicles - MudRunner trucks) :slight_smile:

I know we have a brand new inputManager event-binder system. Maybe that is how we do our flight sticks, too. Thoughts? (thx)

I suppose the manufacturer’s flight stick config-software… is pertinent/important, somehow (converts flight-stick events… to allowed/common DOM events/keypresses? I’m SO unaware, hrmph.) In the description for that shuttle-knob thing above (one-handed steering wheel)… it says…

“Any application that uses key commands.”

Does that include browsers… with focused renderCanvas element, too? I would think so. But, that shuttle thing is a repeat-keypress-generator and NOT an analog potentiometer (pot)… which sort of sucks. I LOVE analog pots for vehicle steering… they have stop-points and can’t endlessly spin… just like a real steering wheel. But real steering wheels… about 5 complete turns… to turn wheels full-sweep? Not possible without a continuous-spin (shuttling) controller, I guess.

Remember the days of analog pots in joysticks? (Radio Shack Color Computer 2). The joystick never self-centers… fun! Push it 30% forward and 40% leftward, let go, and the joystick stays there. Cool.

It seems BJS/DK wants to stay out-of input devices hell, which I can understand completely. The new input-event-binder is a “shell”… a basic interface. I think it needs/invites fleshing-out… by ALL of us… as wanted. I wouldn’t mind offering players… flight stick control… for my Space Taxi 3D thing. Perhaps… all I need to do is honor hold-to-repeat keypresses in my game, and the flight-stick config software and its owner… take care of the rest. But I cannot change held-down-key… delay-before-repeating value… from within JS, right? That’s system level, me thinx. hmm.

Hey @Wingnut,

The inputManager and so on are all based on the browser gamepad APIs which if they are supported by the browser, would be supported in BJS. The force feedback vibration and specific behaviors as if I recall correctly the js spec never landed for those.

You might need to config a bit the binding but that should be it IF the browser supports it.

1 Like

Thx Bavvy! I tried it in a playground, with Firefox…

window.addEventListener("gamepadconnected", function(e) {
  console.log("Gamepad connected at index %d: %s. %d buttons, %d axes.",
    e.gamepad.buttons.length, e.gamepad.axes.length);});

info about gamepad api

Then I plugged-in a 15-year-old Saitek flight stick…

Console: Gamepad connected at index 0: 06a3-0006-CYBORG 3D USB. 18 buttons, 4 axes.

How cool is THAT!? 15 years old! Wow. ok, ok, I think we have some potential, here. Thx agn, @sebavan … nice lead… I’m on the road to more edu.

1 Like