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 /
  • Help Room /
avatar image
2
Question by MagicStyle · Nov 03, 2017 at 11:19 AM · documentationxboxcontroller

How to use right analog stick from xbox controller to look around?

I try to use my xbox controller as input device. However the documentation fails to explain how to set it up.

E.g. how can I use the right stick from my xbox controller to look around, like in any game? Even such a common task is not documented.

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

4 Replies

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

Answer by MagicStyle · Nov 03, 2017 at 12:50 PM

I figured it out. You have to name the Y-Axis Control 'Mouse Y' and the X-Axis Control 'Mouse X'. And set the Y-Axis to 5th axis and the X-Axis to 4th axis. You also have to invert Mouse X

alt text


temp.jpg (48.8 kB)
Comment
Add comment · Show 4 · 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 beliefengine · Nov 11, 2019 at 12:00 AM 0
Share

This is the most beautiful comment I've seen all month, thank you for this info

avatar image LelandGreen · Aug 25, 2020 at 12:42 PM 1
Share

To use settings such as in the attached screenshot, I just use the following code:

         float pitch = Input.GetAxis("Pitch");
         float roll = Input.GetAxis("Roll");

:-) alt text

2020-08-24-10-18-46-flytime-00001a-hackmanite-worl.jpg (45.3 kB)
avatar image josiest · Dec 25, 2020 at 02:28 AM 0
Share

I don't think it really matters what you name it, so long as you use 4th axis for x and 5th axis for y. For instance in projects where that controls the camera, it probably makes more sense to name it something like "Camera Horizontal" and "Camera Vertical"

avatar image SlayGames · Mar 19 at 12:27 PM 0
Share

Thanks so much @MagicStyle, this helped so much.,thanks so much @MagicStyle this helped so much.

avatar image
2

Answer by trapazza · Mar 02, 2020 at 05:55 PM

The name is irrelevant, you can use whichever name you want as long you use that same name when calling Input.GetAxis( "that name" );

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
avatar image
0

Answer by davidnibi · Jan 25, 2019 at 12:23 AM

Thanks. It's tricky to find documentation on this type of thing!

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
avatar image
0

Answer by LelandGreen · Aug 25, 2020 at 12:13 PM

(I googled the subject and found this thread. However, it didn't work quite as advertised. So Just to be clear, I will make two posts – because I can only attach one screenshot/post).

First, for a wireless XBox Controller, I had to use Joy Num = "Joystick 3" to get this to work.

Second, the real advantage of using "Mouse X" and "Mouse Y" for the Name field is that it automatically maps the right joystick to "free look". (Or, to be clear, it's mapped to whatever the mouse movement is. Many 1st-person games use this layout.)

I confirmed this works by creating a new project, a simple Gaia scene, player and all. I made no other changes than to this input mapping, and it "automatically" works for Free Look action, just like the mouse.

*EDIT: While my previous answer worked for some time, I found a bug.

I discovered that the problem arises when you have over one controller. The number of the controller can change! (So "Joy Num" can change each time it's powered on.)

The only clean & quick solution I could find was to use Rewired. Slight learning curve, but after a morning with the manual, I could re-code the Gaia First Person Controller very simply. And it always works. Job done! Move onto the fun stuff. (Third person controller to follow, but I prefer FP for initial testing.)

Best regards and happy holidays to those now celebrating, Leland

alt text


2020-08-24-10-13-39-gaia-pro-3d-test-project-gaia.jpg (47.7 kB)
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

124 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 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

Monodevelop does't open correct Unity docs search page 1 Answer

Is there a Unity offline documentation for mobile? 0 Answers

How to create and set different Player ID's to individual controllers? 0 Answers

A relatively simple question of what two unity functions are called 2 Answers

C# Documentation vs Unity3D: Private vs Internal 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