I've decided to grab mouse position from os ionstead of using Unity Input, to avoid mouse lag.
What I'm using is:
[DllImport("user32.dll")]
public static extern bool GetCursorPos(out POINT lpPoint);
I'm aware, it will make my code platform - dependent, it's not a problem. But I wonder, is it safe to use? Is there any possibility this approach will be bad for stability or performance of my game?
↧