How do I use the HAT joystick sensor.


I’ve been buzzing around trying to figure out how to the joystick hat sensor.

At first it was just curiosity, I was playing around with different options for the joystick to make my character move. Eventually I made my way to ‘hat’. Then I quickly found out that no matter what settings I used in hat, there was no effect.

I’ve done many searches, and all they do is describe what hat is, but not how to use it.

could someone let me in on this. :spin:


It is the small switch at the top of the joystick, usally controlled by your thumb.
it allso usually has 8 directions, usefull for moving the camera view around etc.

sorry, what I mean is how do I do I get it to function in GE

I want to use the option “Up/Right” for the hat trigger, to make a cube move.

but when I do that, the cube can’t move anymore.

so I must be setting up the logic bricks wrong…or something.

Content has been removed. MayDev

Thank you Mayham,

Ok, I’ve opened your blend file and I stared GE, what’s the next step to make the cube move?

Content has been removed. MayDev

I’ve tested it in both 2.4 and 2.5???

I only have one controller???

now I’m scared the my controller might be crap, but it works just fine with the axis option.

Content has been removed. MayDev

It shows the top hat.

(I don’t know if this helps, but my controller is modeled after a Playstaion 2 controller)

Is there a 2.45 version of the script? (even though I have 2.55, my project in 2.45, I don’t want to bring it over yet because 2.45 performs better on my computer)

sorry, I just realized that this was posted in the wrong spot. Thanks to whoever moved this here.

(I had two tabs open when I made the thread, I guess I got confused when it came time to post)

So…any ideas on How to fix this problem with my joystick’s hat sensor?