I’m having an issue where no matter where my mouse is on screen, Deub.Log(Input.mousePosition) always returns the same vector. It seems like it may be the starting position of the mouse when I press the play button. Anyone know how to fix this issue?
Show us your code…
I didn’t think code would be necessary due to the nature of the post, but here is my code:
void Update()
{
Debug.Log(Input.mousePosition);
}
It never hurts to make sure how you are testing it out. But I don’t see any issues with that. What version of Unity are you on? And what position is it printing out? Is it just printing the position once for the mouse over and over. If you move the mouse and hit ctrl + p to play, does it always just use the position of the mouse starting?
Fair enough.
It looks like it just gets the starting position and just prints that position over and over I literally just updated Unity to the absolute newest version tonight 2019.1.3f1 Personal
Well, tested it out just to be certain, and I’m not seeing that issue. If you’re testing this in an empty scene with only that line of code and it’s not changing, then I’ll be honest, not sure what it could be.
I wonder if the experimental input system could be messing with it maybe? It’s not an empty project, but I have no code that I wrote affecting mouse position
Edit
I just did some tests and I think it is the experimental input system overriding the mouse controls. I just gotta figure out how to use it and I should be ok. Thanks for your help
Ah, got it. That’s good to know in case others encounter that same issue, may give something for them to look at.
To be honest I should have thought about it sooner. You have to disable the old input system. But for whatever reason it just wasn’t clicking. Hopefully it does help someone else in the future