- Home /
Getting decimal places for Input.mousePosition
Hello, Dear Community members,
First, apologize that my English isn't perfect, but I'm native German speaker. I have a really big problem and I can't find anything on the forums that is related to my problem. For some reason, I get values with decimal places when I let the software log Input.mousePosition. Here is an example:
When I mentioned this in another threat on the German Unity community, several users said that they had never heard of it, and that it can't be. What annoys me to, is that it using commas, suddenly, althought it used points until yesterday. Maybe it isn't a Unity problem but a native Windows problem. But even if it is a Windows problem, I don't have any idea what to do about it.
Further information:
Unity version: 2019.2.0f1
Windows: Windows 10 Pro
It would please me if you could give me any help. Thanks.
yours RL
Answer by SerbiX8 · Oct 27, 2020 at 08:31 PM
Hello, RL. I found this, you should take a look at this thread. Not sure if it will fix the decimals though... If it doesn't, I might need to take a look at your code, if you don't mind posting it here. Cheers.
my code is not really interesting, but okay I will post it, for example in a test project I have a class Test.cs with this code:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Test : $$anonymous$$onoBehaviour { void Start() {}
void Update() { Debug.Log(Input.mousePosition); } }
Edit: the problem about the commas disappeared after deleting the .sln file of the project. But the problem about decimal places still remains. For my purpose, I need to get the mouse position in full numbers. And what's more, in the German forum people said that they couldn't believe it. Seems like it isn't normal. What do I do now?