Disclaimer: Just downloaded Unity for the first time today
When I started Unity and tried the demo, the character kept running to the left, this seemed strange to me, so I investigated the code, and came to the conclusion that Input.GetAxis("Horisontal") and Input.GetAxis("Vertical") returned the wrong values (-1 and 1 when no keys were pressed) equipped with that suspicion I made this demo file:
public class MoveMe : MonoBehaviour
Debug.Log("X=" + Input.GetAxisRaw("Horizontal") + " Y=" + Input.GetAxisRaw("Vertical"))
and once I ran it It returned
When I didn't touch any keys... I have tried remapping the Input, just in case that it had something to do with my keyboard or something, but that didn't change anything...
Any help would be much appreciated, as I'd really like to get started on Unity3d development
Note: I'm using C#, and I have a pretty decent knowledge of it, so you don't have to dumb down your answers for me (but please do explain them)
Do you have any joysticks or gamepads plugged in? I strongly suspect that it's something to do with your local setup, because I'm not getting anything like that here.
I don't have any as far as I can tell, but now that you mention it, I did install a gamepad emulator some time ago, maybe there's something with that driver... I'll have a look...
Uninstalled the emulation (Vjoy if anyone have the same problem) and it now seems to work!! Thanks for reminding me of that :) Now off to learn Unity...
Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.
The best place to ask and answer questions about development with Unity.
To help users navigate the site we have posted a user guide.
If you are a new user, check out our FAQ for more information.
If you are a moderator, see our Moderator Guidelines page.
We are making improvements to UA, see the list of changes.
For troubleshooting common problems with Unity 5.x Editor (including Win 10).
Answers and Comments
5 People are following this question.
Joystick axes output wrong in 4.3.4
Object position values glitch?
How can I prevent Input.GetAxis from sporadically reporting deltas of 0.0?
Scrollview with Input.MousePosition?
Android: Touch Input Timeout Issue