Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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 falconfetus8 · Jan 27, 2017 at 07:05 PM · inputmouselookunits

What units does Input.GetAxis("Mouse X") use?

I'm trying to make an aim training simulator for Overwatch, and I need to make sure the sensitivity scale in my game match's Overwatch's. To do this, I need to know exactly what Unity means when it says the mouse moved by "0.21" in the x-direciton. What units is that in? Pixels? Dots? Inches? I can't find this information anywhere on google.

Thanks in advance!

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 zwcloud · Nov 11, 2019 at 04:36 AM 0
Share

https://gamedev.stackexchange.com/a/173792/66022

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by hexagonius · Jan 28, 2017 at 11:43 AM

The docs say:

If the axis is setup to be delta mouse movement, the mouse delta is multiplied by the axis sensitivity

They don't say anything about what the mouse delta would be, but since it's movement and movement is a change in position it should be the position delta, and that's in pixelcoordinates.

Comment
Add comment · Show 7 · 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 falconfetus8 · Jan 28, 2017 at 03:07 PM 0
Share

So how would that translate to "dots", in terms of dots-per-inch?

avatar image tanoshimi · Jan 28, 2017 at 09:30 PM 0
Share

@falconfetus8 DPI is a term used in printing. Computers have pixels, not dots, and the delta movement is already calculated in pixels.

avatar image falconfetus8 tanoshimi · Jan 29, 2017 at 12:54 AM 0
Share

Well, I still need to find out how many pixels are in a "dot". The end-goal is to convert a known number of centimeters-per-360 into pixels-per-360. Since I know the dots-per-inch of my mouse, I can convert that to dots-per-360. The next step is to convert that into pixels-per-360, but I need to know how many of these "dots" equal one pixel.

avatar image Eric5h5 falconfetus8 · Jan 29, 2017 at 02:22 AM 1
Share

There's no way to know. Different mice have different resolutions, plus user settings and things like mouse acceleration affect it, and there's no API for getting any of that information. The only way to get your mouse movement code to exactly match someone else's mouse movement code is to actually get your hands on that code.

Show more comments
avatar image siliconpi · Sep 05, 2019 at 11:26 AM 0
Share

Were you able to reach a conclusion to this? What are the units of the mouse movement - was it inches?

avatar image Bunny83 siliconpi · Sep 05, 2019 at 03:15 PM 0
Share

No, it's a dimensionless value since it's usually scaled by an arbitrary sensitivity setting of the OS. However the best match would probably be "pixels" since the cursor is usually simply moved by the delta that comes from the mouse. If you use the mouse input for something else than moving a cursor around it's just arbitrary.

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

72 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

Related Questions

Mouse input lag.. 2 Answers

have object rotate to the mouses screen position 1 Answer

Controlling MouseLook script with keys/joystick 1 Answer

Mouse movement swings character around in circles 1 Answer

Pause Menu Wont Disable Mouse,Pause menu wont disable Player Controls 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