Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 14 Next capture
2021 2022 2023
2 captures
12 Jun 22 - 14 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 RoninUnity · Apr 30, 2018 at 12:56 PM · steeringlogitech

Logitech steering wheel as Unity input?

The last few weeks I have been trying to hook up my logitech steering wheel to my unity car. In my car controlling script I just call the "Horizontal" axis via: Input.GetAxis("Horizontal"). That works fine, some of the buttons you can use via Fire1, Fire2 and Fire3 but the rest of the buttons I somehow can't find how to call them. Like for example, T want to use the two blinkers in my game, I don't know how I Have to access these.

Unity version: Unity Personal 2017.2.0f3, Steering wheel: Logitech Formula Force RX

Any help would be appreciated,

Ronin.

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

1 Reply

· Add your reply
  • Sort: 
avatar image
1

Answer by DanielleSisserman · Nov 20, 2018 at 10:54 AM

Here's the thing. Turns out, that to get the buttons input from the buttons on the wheel you cannot use Input.GetAxis(). GetAxis is like a slider value from 0 to 1 and buttons should only return true or false.

Looking up more online, you'll see that everyone recommends using Input.GetButton() and then just try all combinations in Input Manager to see which one works. This for some reason did not work for me. So I gave up on Input.GetButton() and am using Input.GetKey (or Input.GetKeyDown). this is what you gotta do:

1) run this script and press your buttons!!! it will show you the joy stick and button number specific for that button.

 public class TestJoystickInput : MonoBehaviour {
 
     // Use this for initialization
     void Update () {
         for (int joystick = 1; joystick < 5; joystick++ ) {
             for (int button = 0; button < 20; button++ ) {
                 if (Input.GetKey("joystick " + joystick + " button " + button))
                 {
 
                     Debug.Log("joystick = " + joystick + "  button = " + button);
                 }
             }
         }
 
     }
 
   
 }


now that you know the joystick number and the button number you can call:

 if (Input.GetKey("joystick " + joystick + " button " + button))


from the update function in your script (depending on what you want, it might be better idea to call GetKeyDown()).

Comment
Add comment · 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

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

81 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

How can i read the value from Logitech Driver Force Gt controller in my unity application? 0 Answers

Logitech steering wheel snapping to middle? 0 Answers

Unitysteer - Rigidbody with gravity stops steering 2 Answers

Accelerometer For Steering?? 0 Answers

Need help to draw the velocity vector using linerenderer (my code and pics inside) 0 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