Sign in to follow this  
clyde

Unity: Questions

Recommended Posts

When I adjust the gravity or sensitivity in the Input Manager it has an effect when I use the keyboard, but when I use the xbox 360 controller, movement is unaffected. I've tried changing the type value to "Joystick axis" but it doesn't solve the problem. Anyone happen to know what I'm doing wrong? In case it matters, I'm working with the horizontal values.

Share this post


Link to post
Share on other sites

Gravity does not apply to axis. The joy axis will recenter when the stick recenters. I believe sensitivity only works on buttons and mouse inputs. You're best to just grab the joy axis and then programatically scale it. 

Share this post


Link to post
Share on other sites

I may be completely wrong, but I think what is happening is you are seeing the difference between a digital signal and an analog one.  What I mean is that when you press a key on your keyboard that is assigned to an axis in Unity ( up arrow, down arrow, etc), you have a very binary state.  Either the key is pressed or not.  Unity then has to run calculations on if the key is pressed and then multiply that by some number to get the gradual change from 0 to 1 ( or -1 to 0 ).  On a joystick you actually have a analog signal that tells Unity exactly where the input is at ( say .51 or -.9).  This means that Unity does not have to run any extra calculations to get the correct input, it just takes the exact value given and returns that to you in your script.

 

Hope that helps.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this