• 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
0
Question by Guenter123987 · Jan 24, 2017 at 05:55 PM · axis

Problem with InputManager axes

I want to add a Z axis to the InputManager (Shift down and Space up). I typed everything in up to "Type". There are 3 options: "Key or Mouse Button", "Mouse Movement" and "Joystick axis". I chose "Key or Mouse Button" because it seamed to be logical. But then I have to choose an axis which is X, Y or a Joystick axis. That's not logical, I want to define an axis. And "Joy Num" is also strange, I don't want to work with Joysticks but there is no "None" option. I'm confused, what do I have to choose?

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 Vicarian · Jan 24, 2017 at 06:09 PM

@Guenter123987 The axis represented by the InputManager isn't actually the axis that you want your object to travel. It simply represents the axis of movement on the device itself. For instance, on the XBox One controller, the two thumbsticks can move in some combination of the X and Y axes. If you move a stick forward, away from your body and perpendicular to it, that's the Y axis on the controller. If you move the stick parallel to your body to the right or left, that's the X axis. The axes are local to the controller, in other words. The reason for there being up to 28 axes is that it allows controllers with more than two objects that move on some axis. For instance, a typical flight stick might have the actual stick, but also have levers for ailerons (brakes, I think), throttle, and others. Each of those could be mapped to a higher order axis than just the first two. It'll largely depend on the device driver.

If you want to move a GameObject along any axis (which in Unity, positive Z is into the screen, while negative Z is moving in a direction out of the screen past and behind you), using the shift and space keys, you'd set up buttons, rather than an axis.

Scripts are how you check your inputs to determine the translation you'll apply to your GameObject.

Comment
Add comment · Show 2 · 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 Guenter123987 · Jan 24, 2017 at 06:28 PM 0
Share

Thank you, that helped a lot. So if I don't want to publish a console version, it's not important what I choose at the last 2 options.

avatar image Vicarian Guenter123987 · Jan 24, 2017 at 06:31 PM 0
Share

Correct, although you may want to take into account folks who use prefer to use gamepads or other controllers with a PC as well. It's not terribly important, but it does allow you to reach a larger set of players.

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.

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

91 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

Related Questions

moving vertex along normals by code 0 Answers

Can I change Coordinate system? [View of UNITY PROGRAM],,Can i change Coordinate system 2 Answers

Can anybody tell me how to display text on axis? 1 Answer

Neuron Mocap Unity SDK 0.2.7 Collider ? 0 Answers

Make the Player unable to move to opposite direction 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