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 Braun0 · Jan 05, 2016 at 08:32 AM · movementinputcontrollerspeed

My Players speed differs depending on the input method (gamepad or keyboard)

My game involves long/high parabolic jumps. I designed the levels using the keyboard as the primary method of player control. However, I just tested the game with an Xbox One controller (wired) - and I noticed that the players max speed is reduced. Meaning the distance the player travels (while jumping) is about 25% less when using the Xbox controller than it is when I use a keyboard. The player speed while walking on the ground is also slower when using the xbox controller. I assume this has something to do with the max x/y axis values of the controller - but I am not sure where to look for a fix.

Any insight or direct to fix this issue would be greatly appreciated.

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 tanoshimi · Jan 05, 2016 at 09:39 AM 0
Share

I imagine it's more likely to do with the way you're normalising (or not) the diagonal vector (1,1).

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by Zoelovezle · Jan 05, 2016 at 12:09 PM

I assume you have multiplied a vector which changes its value to with your speed. Say your speed is 5

  • If you multiply speed with with Vector3(1,0,0) * speed it will give you the max speed i.e. Vector3(1,0,0)*5 = Vector3(5,0,0)

  • Similarly for Vector3(0,1,0) and Vector(1,1,0) and they will give Vector3(0,5,0) & Vector3(5,5,0)

  • Now suppose your Vector3 is acting as direction is normalized using Vector3.Normalize .

  • Lets say that Vector is Vector3(0.4, 0.3 ,0) now if you multiply with speed , i.e. Vector3(0.4, 0.3 ,0)*5 = Vector3(2,1.5f,0) .

  • Now its clear the speed will decrease according to the Normalized direction.

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

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

Speed pickup 1 Answer

The name 'Joystick' does not denote a valid type ('not found') 2 Answers

How do I listen for Input from joystick/buttons on a controller? 1 Answer

Continuous Adjustable Movement in 360 degrees 0 Answers

Gradual Speed Increase with Variable Input 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