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
0
Question by GregoryFenn · Aug 10, 2019 at 06:33 AM · inputjoysticksettingsjoysticksproject settings

Input Axis names and axis type (help with joysticks)

Hey all,

The Scripting API/Unity Manual is rubbish here... any help: I want to understand the last three sections of the Input System project settings.

  1. (probably the easiest!) How do the three types differ: KeyOrMouseButton, MouseMovement, JoystickAxis?

  2. What are the many different Axes about? (X, Y, 3rd Axis (js + mouse), 4th Axis, 5th Axis, ...., 28th Axis)? The documentation only says "Choose the axis of input from the device (joystick, mouse, gamepad, etc.). Defaults to the X-axis.". And this isn't that helpful. My intuition is that for linear floats from -1 to 1, (possibly smoothed-out depending on gravity, snapping, sensitivity, and dead zone), you basically always use X axis - am I right?

  3. How do I figure out what joystick my player will use (all?, 1, 2, ..., 16?)?

My use case right now is I'm trying to control two separate Transforms via the left and right joysticks on my Nintendo Switch Pro controller (basically the same shape as Xbox controllers). I would guess that left stick is Joystick1 and right stick is Joystick2. But that doesn't seem to work!

Comment
Add comment · Show 1
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 DCordoba · Aug 10, 2019 at 01:08 PM 0
Share

1)

$$anonymous$$eyOr$$anonymous$$ouseButton works like getkey();

$$anonymous$$ouse$$anonymous$$ovement is a standard for track mouse

JoystickAxis the keys of the joystick usually are processed as separated axis

so, why don't track directly the Input of each device (getkey() for keyboard, get$$anonymous$$ouseButtonDown() for mouse, get$$anonymous$$ouse$$anonymous$$ove()... etc) because we want some properties predefined and always used, like check dead zone, smooth transition, etc

2)

the axis are a virtual way to control "equilibrium" of a object, by example, you can control one axis with two keys (W to add positive S to add negative) so you just need to access that axis to check both (forward and backward movement) useful to control acceleration on a car-like game, isnt it?,

on the other hand, one device can control more than a axis, by example, mouse, mouse moves on a 2d plane, to check that unity uses left - right axis (left add negative, right positive) on $$anonymous$$ouse X, and a forward-backward axis on $$anonymous$$ouse Y...

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by nathan122 · Apr 20 at 07:30 PM

for number n3 you will have to search for a input axis sheet to find the names of the button layouts.

Comment
Add comment · Show 1 · 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 nathan122 · yesterday 0
Share

Heres a sheet: https://www.reddit.com/r/gamedev/comments/8auep6/mapping_an_xbox_one_controller_in_unity_including/

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

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

Related Questions

Help In Making a SphereCast for 3D Tire! Working RayCast Script included! 0 Answers

Input.GetAxis returning nonsensical values for HID Sensor/GameController 0 Answers

Problem setting up twin stick shooter for mobile device... 1 Answer

Project Settings can not be opened 1 Answer

Xbox controller joystick axis small movements? 1 Answer


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