edge lab LIVE! starts Tuesday in Munich. Grab a workshop seat and take home the board you build on. Code FRIEND-HACKSTER saves 20%. () Learn more!
D'ante McCain
Published © GPL3+

Hat Controller

Control your game with your head

BeginnerFull instructions provided4 hours182
Hat Controller

Story

Read more

Code

My Code

JavaScript
input.buttonA.onEvent(ButtonEvent.Click, function () {
    keyboard.type("a")
})
input.buttonB.onEvent(ButtonEvent.Click, function () {
    keyboard.type("d")
})
input.onGesture(Gesture.TiltLeft, function () {
    keyboard.type("w")
})
input.onGesture(Gesture.TiltRight, function () {
    keyboard.type("s")
})

Credits

D'ante McCain
4 projects • 0 followers

Comments