Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
1
Question by spiel2001 · Jul 29, 2010 at 01:08 AM · inputjoystickkeycode

Input key codes for Logitech Extreme 3D Pro

I'm trying to use a Logitech Extreme 3D Pro joystick with Unity and I can get all of the buttons except the "Hat" on the top of the joystick which I want to use for POV. I may have messed up in testing, but it didn't seem to correlate to either a joystick button or a joystick axis.

Does anyone happen to know what the correct key code are to use with the hat on this joystick?

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

2 Replies

· Add your reply
  • Sort: 
avatar image
3
Best Answer

Answer by Eric5h5 · Jul 29, 2010 at 04:12 AM

The hat is the 5th and 6th joystick axes, for left/right and up/down respectively.

Comment
Add comment · Show 5 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image spiel2001 · Jul 29, 2010 at 03:01 PM 0
Share

Hmmm... no response to the 5th and 6th axis. Starting to think I might have some other issue going on. Thank you very much for the input.

avatar image Eric5h5 · Jul 29, 2010 at 06:21 PM 0
Share

@spiel2001: I have that joystick; it definitely works here.

avatar image spiel2001 · Jul 29, 2010 at 07:09 PM 0
Share

I figured it out -- it was a stupid programmer trick on my part... I was allowing the use of either a mouse-look via left-click and drag or via the POV hat... well... if you're using the hat, you're not left-clicking the mouse are you. /doh

Once I realized that, I got the input from the hat. However, for the record, it came in on 4th and 5th axis for me.

Again... thank you.

avatar image Eric5h5 · Jul 29, 2010 at 07:23 PM 0
Share

@spiel2001, hmm, the 4th axis should be the throttle, at least going by the axis numbering in the input manager, which starts at 1 rather than 0.

avatar image Mr.S · Jan 16, 2015 at 03:25 AM 0
Share

hi @spiel2001 may I know what is your input for x/y axis for the stick. $$anonymous$$y program cannot detect any movement from the stick but all the other button and hat can be detected.

Hope you can help.

avatar image
0

Answer by qJake · Jul 29, 2010 at 03:01 AM

First, check to make sure it even shows up in the Windows Gamepad configuration screen (Gamepad settings in the control panel). Press the button with that screen open and see if any inputs light up. If not, this button is not a "normal" joystick button and can't be used (The Xbox button on the 360 controller is a good example of a "special" button). If it does light up, chances are you're just missing it in Unity's configuration. You can use a script like this to find out what button number it is:

// Stick this in Update() // C#

for(int i = 0; i < 20; i++) { if(Input.GetKeyDown("joystick button " + i)) { Debug.Log("Button " + i + " was pressed!"); } }

Comment
Add comment · Show 3 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Eric5h5 · Jul 29, 2010 at 04:15 AM 0
Share

The hat isn't a button, so I'm afraid that won't do anything.

avatar image qJake · Jul 29, 2010 at 05:12 AM 0
Share

Oh...well he said "I got all the buttons except the hat", so, ya know, I just went off that, but you obviously know what joystick he's talking about. :P

avatar image spiel2001 · Jul 29, 2010 at 03:00 PM 0
Share

Yeah... it definitely does not show up as a button, but thank you for the input.

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

1 Person is following this question.

avatar image

Related Questions

KeyCode enum missing fourth joystick index 1 Answer

scripting joystick input on javascript 1 Answer

Unity ignoring joysticks of specified number 0 Answers

How to get raw joystick axis data from script (C#)? 1 Answer

D-Pad as Button instead of Axis 3 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges