Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Author
Message
Shady Simpson
23
Years of Service
User Offline
Joined: 15th Mar 2003
Location: United Kingdom
Posted: 29th May 2003 13:04
H,

Iwas just wondering what the joystick hat angle command is or does.
I can't make it out from the help file

thanx.
Beta1
23
Years of Service
User Offline
Joined: 28th Dec 2002
Location:
Posted: 29th May 2003 13:08
You have a joystick with a hat on top, (like a mini joystick).

The joystick hat command tells you which way the hat is pointing/being pushed...

Shady Simpson
23
Years of Service
User Offline
Joined: 15th Mar 2003
Location: United Kingdom
Posted: 29th May 2003 14:03
eh?

Didn't quite understand that. (probably the bit about joysticks wearing hats. Are you sayin that it returns the angle of which way te joystick is heading?

Thanx.

spooky
23
Years of Service
User Offline
Joined: 30th Aug 2002
Location: United Kingdom
Posted: 29th May 2003 14:23 Edited at: 29th May 2003 14:25


See that little thing on top of stick, that's a hat.

JOYSTICK HAT ANGLE

This command will give support for reading up to 4 HAT controllers. When the hat controller is neutral, a value of -1 is returned. When the hat is being used, the return value is in tens of a degree so north would be zero, east would be 900, south is 1800 and west is 2700.

SYNTAX
Return Integer=JOYSTICK HAT ANGLE(Hat Number)

--------------------

I believe some hats only have 4 directions but others have 8,i.e. N,NE,E,SE,e.t.c.

Gronda, Gronda
Beta1
23
Years of Service
User Offline
Joined: 28th Dec 2002
Location:
Posted: 29th May 2003 15:08
The hat is like a little joystick on top of the main stick. Otherwise known as a coolie hat cos it normally looks like the wide conical hats chinese stereotype peasants wear.

The hat is normally a digital switched device in that its either pushed fully to one direction or not, theres no in between. Depending on the direction the hat is pushed the joystick hat angle returns the direction it is pushed as described above.

I think the one I have is 8 directional.

Login to post a reply

Server time is: 2026-07-11 11:42:04
Your offset time is: 2026-07-11 11:42:04